You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove the --experimental-page-id-routing gate so pageId is always
exposed on page-scoped tools. Update evaluate_script which had its own
duplicate gate. Fix docs generator to include pageId for page-scoped
tools. Regenerate cliDefinitions.ts and tool-reference.md.
- Remove experimentalPageIdRouting conditions from schema injection and
page resolution in index.ts
- Mark --experimental-page-id-routing CLI flag as deprecated
- Improve pageIdSchema description to be more helpful
- Remove evaluate_script's own experimentalPageIdRouting gate; also
fixes a latent bug where getPageById(undefined) was called when the
flag was on but pageId was absent
- Fix pageId type in script.test.ts (string -> number)
- Fix generate-docs.ts to inject pageIdSchema for page-scoped tools so
tool-reference.md accurately reflects available parameters
-**uid** (string) **(required)**: The uid of an element on the page from the page content snapshot
50
50
-**dblClick** (boolean) _(optional)_: Set to true for double clicks. Default is false.
51
51
-**includeSnapshot** (boolean) _(optional)_: Whether to include a snapshot in the response. Default is false.
52
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
52
53
53
54
---
54
55
@@ -61,6 +62,7 @@
61
62
-**from_uid** (string) **(required)**: The uid of the element to [`drag`](#drag)
62
63
-**to_uid** (string) **(required)**: The uid of the element to drop into
63
64
-**includeSnapshot** (boolean) _(optional)_: Whether to include a snapshot in the response. Default is false.
65
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
64
66
65
67
---
66
68
@@ -73,6 +75,7 @@
73
75
-**uid** (string) **(required)**: The uid of an element on the page from the page content snapshot
74
76
-**value** (string) **(required)**: The value to [`fill`](#fill) in
75
77
-**includeSnapshot** (boolean) _(optional)_: Whether to include a snapshot in the response. Default is false.
78
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
76
79
77
80
---
78
81
@@ -84,6 +87,7 @@
84
87
85
88
-**elements** (array) **(required)**: Elements from snapshot to [`fill`](#fill) out.
86
89
-**includeSnapshot** (boolean) _(optional)_: Whether to include a snapshot in the response. Default is false.
90
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
87
91
88
92
---
89
93
@@ -94,6 +98,7 @@
94
98
**Parameters:**
95
99
96
100
-**action** (enum: "accept", "dismiss") **(required)**: Whether to dismiss or accept the dialog
101
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
97
102
-**promptText** (string) _(optional)_: Optional prompt text to enter into the dialog.
98
103
99
104
---
@@ -106,6 +111,7 @@
106
111
107
112
-**uid** (string) **(required)**: The uid of an element on the page from the page content snapshot
108
113
-**includeSnapshot** (boolean) _(optional)_: Whether to include a snapshot in the response. Default is false.
114
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
109
115
110
116
---
111
117
@@ -117,6 +123,7 @@
117
123
118
124
-**key** (string) **(required)**: A key or a combination (e.g., "Enter", "Control+A", "Control++", "Control+Shift+R"). Modifiers: Control, Shift, Alt, Meta
119
125
-**includeSnapshot** (boolean) _(optional)_: Whether to include a snapshot in the response. Default is false.
126
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
120
127
121
128
---
122
129
@@ -127,6 +134,7 @@
127
134
**Parameters:**
128
135
129
136
-**text** (string) **(required)**: The text to type
137
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
130
138
-**submitKey** (string) _(optional)_: Optional key to press after typing. E.g., "Enter", "Tab", "Escape"
131
139
132
140
---
@@ -140,6 +148,7 @@
140
148
-**filePath** (string) **(required)**: The local path of the file to upload
141
149
-**uid** (string) **(required)**: The uid of the file input element or an element that will open file chooser on the page from the page content snapshot
142
150
-**includeSnapshot** (boolean) _(optional)_: Whether to include a snapshot in the response. Default is false.
151
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
143
152
144
153
---
145
154
@@ -172,6 +181,7 @@
172
181
-**handleBeforeUnload** (enum: "accept", "decline") _(optional)_: Whether to auto accept or beforeunload dialogs triggered by this navigation. Default is accept.
173
182
-**ignoreCache** (boolean) _(optional)_: Whether to ignore cache on reload.
174
183
-**initScript** (string) _(optional)_: A JavaScript script to be executed on each new document before any other scripts for the next navigation.
184
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
175
185
-**timeout** (integer) _(optional)_: Maximum wait time in milliseconds. If set to 0, the default timeout will be used.
176
186
-**type** (enum: "url", "back", "forward", "reload") _(optional)_: Navigate the page by URL, back or forward in history, or reload.
-**text** (array) **(required)**: Non-empty list of texts. Resolves when any value appears on the page.
222
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
212
223
-**timeout** (integer) _(optional)_: Maximum wait time in milliseconds. If set to 0, the default timeout will be used.
213
224
214
225
---
@@ -225,6 +236,7 @@
225
236
-**cpuThrottlingRate** (number) _(optional)_: Represents the CPU slowdown factor. Omit or set the rate to 1 to disable throttling
226
237
-**geolocation** (string) _(optional)_: Geolocation (`<latitude>x<longitude>`) to [`emulate`](#emulate). Latitude between -90 and 90. Longitude between -180 and 180. Omit clear the geolocation override.
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
228
240
-**userAgent** (string) _(optional)_: User agent to [`emulate`](#emulate). Set to empty string to clear the user agent override.
229
241
-**viewport** (string) _(optional)_: [`Emulate`](#emulate) device viewports '<width>x<height>x<devicePixelRatio>[,mobile][,touch][,landscape]'. 'touch' and 'mobile' to [`emulate`](#emulate) mobile devices. 'landscape' to [`emulate`](#emulate) landscape mode.
230
242
@@ -238,6 +250,7 @@
238
250
239
251
-**height** (number) **(required)**: Page height
240
252
-**width** (number) **(required)**: Page width
253
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
241
254
242
255
---
243
256
@@ -251,6 +264,7 @@
251
264
252
265
-**insightName** (string) **(required)**: The name of the Insight you want more information on. For example: "DocumentLatency" or "LCPBreakdown"
253
266
-**insightSetId** (string) **(required)**: The id for the specific insight set. Only use the ids given in the "Available insight sets" list.
267
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
254
268
255
269
---
256
270
@@ -262,6 +276,7 @@
262
276
263
277
-**autoStop** (boolean) _(optional)_: Determines if the trace recording should be automatically stopped.
264
278
-**filePath** (string) _(optional)_: The absolute file path, or a file path relative to the current working directory, to save the raw trace data. For example, trace.json.gz (compressed) or trace.json (uncompressed).
279
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
265
280
-**reload** (boolean) _(optional)_: Determines if, once tracing has started, the current selected page should be automatically reloaded. Navigate the page to the right URL using the [`navigate_page`](#navigate_page) tool BEFORE starting the trace if reload or autoStop is set to true.
266
281
267
282
---
@@ -273,6 +288,7 @@
273
288
**Parameters:**
274
289
275
290
-**filePath** (string) _(optional)_: The absolute file path, or a file path relative to the current working directory, to save the raw trace data. For example, trace.json.gz (compressed) or trace.json (uncompressed).
291
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
276
292
277
293
---
278
294
@@ -283,6 +299,7 @@
283
299
**Parameters:**
284
300
285
301
-**filePath** (string) **(required)**: A path to a .heapsnapshot file to save the heapsnapshot to.
302
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
286
303
287
304
---
288
305
@@ -294,6 +311,7 @@
294
311
295
312
**Parameters:**
296
313
314
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
297
315
-**reqid** (number) _(optional)_: The reqid of the network request. If omitted returns the currently selected request in the DevTools Network panel.
298
316
-**requestFilePath** (string) _(optional)_: The absolute or relative path to save the request body to. If omitted, the body is returned inline.
299
317
-**responseFilePath** (string) _(optional)_: The absolute or relative path to save the response body to. If omitted, the body is returned inline.
@@ -307,6 +325,7 @@
307
325
**Parameters:**
308
326
309
327
-**includePreservedRequests** (boolean) _(optional)_: Set to true to return the preserved requests over the last 3 navigations.
328
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
310
329
-**pageIdx** (integer) _(optional)_: Page number to return (0-based). When omitted, returns the first page.
311
330
-**pageSize** (integer) _(optional)_: Maximum number of requests to return. When omitted, returns all requests.
312
331
-**resourceTypes** (array) _(optional)_: Filter requests to only return requests of the specified resource types. When omitted or empty, returns all requests.
@@ -333,6 +352,7 @@ so returned values have to be JSON-serializable.
333
352
}`
334
353
335
354
-**args** (array) _(optional)_: An optional list of arguments to pass to the function.
355
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
336
356
337
357
---
338
358
@@ -343,6 +363,7 @@ so returned values have to be JSON-serializable.
343
363
**Parameters:**
344
364
345
365
-**msgid** (number) **(required)**: The msgid of a console message on the page from the listed console messages
366
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
346
367
347
368
---
348
369
@@ -355,6 +376,7 @@ so returned values have to be JSON-serializable.
355
376
-**device** (enum: "desktop", "mobile") _(optional)_: Device to [`emulate`](#emulate).
356
377
-**mode** (enum: "navigation", "snapshot") _(optional)_: "navigation" reloads & audits. "snapshot" analyzes current state.
357
378
-**outputDirPath** (string) _(optional)_: Directory for reports. If omitted, uses temporary files.
379
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
358
380
359
381
---
360
382
@@ -365,6 +387,7 @@ so returned values have to be JSON-serializable.
365
387
**Parameters:**
366
388
367
389
-**includePreservedMessages** (boolean) _(optional)_: Set to true to return the preserved messages over the last 3 navigations.
390
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
368
391
-**pageIdx** (integer) _(optional)_: Page number to return (0-based). When omitted, returns the first page.
369
392
-**pageSize** (integer) _(optional)_: Maximum number of messages to return. When omitted, returns all requests.
370
393
-**types** (array) _(optional)_: Filter messages to only return messages of the specified resource types. When omitted or empty, returns all messages.
@@ -380,6 +403,7 @@ so returned values have to be JSON-serializable.
380
403
-**filePath** (string) _(optional)_: The absolute path, or a path relative to the current working directory, to save the screenshot to instead of attaching it to the response.
381
404
-**format** (enum: "png", "jpeg", "webp") _(optional)_: Type of format to save the screenshot as. Default is "png"
382
405
-**fullPage** (boolean) _(optional)_: If set to true takes a screenshot of the full page instead of the currently visible viewport. Incompatible with uid.
406
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
383
407
-**quality** (number) _(optional)_: Compression quality for JPEG and WebP formats (0-100). Higher values mean better quality but larger file sizes. Ignored for PNG format.
384
408
-**uid** (string) _(optional)_: The uid of an element on the page from the page content snapshot. If omitted takes a pages screenshot.
385
409
@@ -394,6 +418,7 @@ in the DevTools Elements panel (if any).
394
418
**Parameters:**
395
419
396
420
-**filePath** (string) _(optional)_: The absolute path, or a path relative to the current working directory, to save the snapshot to instead of attaching it to the response.
421
+
-**pageId** (number) _(optional)_: Targets a specific page by ID. Use [`list_pages`](#list_pages) to get available page IDs. If omitted, operates on the most recently selected page.
397
422
-**verbose** (boolean) _(optional)_: Whether to include all possible information available in the full a11y tree. Default is false.
0 commit comments