From 64b23040dc9a622bf520eab8c6c587bfe38c935b Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Mon, 14 Jun 2021 08:13:28 -0700 Subject: [PATCH] chore: use new links in generated types (#7102) --- types/types.d.ts | 1373 ++++++++++++++++----------------- utils/generate_types/index.js | 19 +- 2 files changed, 688 insertions(+), 704 deletions(-) diff --git a/types/types.d.ts b/types/types.d.ts index dfb44bbc36..0492a95e5b 100644 --- a/types/types.d.ts +++ b/types/types.d.ts @@ -76,17 +76,16 @@ export interface Page { * Returns the value of the `pageFunction` invocation. * * If the function passed to the - * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#pageevaluatepagefunction-arg) returns a - * [Promise], then - * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#pageevaluatepagefunction-arg) would wait - * for the promise to resolve and return its value. + * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) returns a [Promise], then + * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) would wait for the + * promise to resolve and return its value. * * If the function passed to the - * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#pageevaluatepagefunction-arg) returns a + * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) returns a * non-[Serializable] value, then - * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#pageevaluatepagefunction-arg) resolves - * to `undefined`. Playwright also supports transferring some additional values that are not serializable by `JSON`: `-0`, - * `NaN`, `Infinity`, `-Infinity`. + * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) resolves to `undefined`. + * Playwright also supports transferring some additional values that are not serializable by `JSON`: `-0`, `NaN`, + * `Infinity`, `-Infinity`. * * Passing argument to `pageFunction`: * @@ -106,7 +105,7 @@ export interface Page { * ``` * * [ElementHandle] instances can be passed as an argument to the - * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#pageevaluatepagefunction-arg): + * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate): * * ```js * const bodyHandle = await page.$('body'); @@ -115,7 +114,7 @@ export interface Page { * ``` * * Shortcut for main frame's - * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frameevaluatepagefunction-arg). + * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate). * @param pageFunction Function to be evaluated in the page context. * @param arg Optional argument to pass to `pageFunction`. */ @@ -126,17 +125,16 @@ export interface Page { * Returns the value of the `pageFunction` invocation as a [JSHandle]. * * The only difference between - * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#pageevaluatepagefunction-arg) and - * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#pageevaluatehandlepagefunction-arg) - * is that - * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#pageevaluatehandlepagefunction-arg) - * returns [JSHandle]. + * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) and + * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) is that + * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) returns + * [JSHandle]. * * If the function passed to the - * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#pageevaluatehandlepagefunction-arg) - * returns a [Promise], then - * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#pageevaluatehandlepagefunction-arg) - * would wait for the promise to resolve and return its value. + * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) returns a + * [Promise], then + * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) would wait + * for the promise to resolve and return its value. * * ```js * const aWindowHandle = await page.evaluateHandle(() => Promise.resolve(window)); @@ -150,7 +148,7 @@ export interface Page { * ``` * * [JSHandle] instances can be passed as an argument to the - * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#pageevaluatehandlepagefunction-arg): + * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle): * * ```js * const aHandle = await page.evaluateHandle(() => document.body); @@ -168,9 +166,9 @@ export interface Page { /** * The method finds an element matching the specified selector within the page. If no elements match the selector, the * return value resolves to `null`. To wait for an element on the page, use - * [page.waitForSelector(selector[, options])](https://playwright.dev/docs/api/class-page#pagewaitforselectorselector-options). + * [page.waitForSelector(selector[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-selector). * - * Shortcut for main frame's [frame.$(selector)](https://playwright.dev/docs/api/class-frame#frameselector). + * Shortcut for main frame's [frame.$(selector)](https://playwright.dev/docs/api/class-frame#frame-query-selector). * @param selector A selector to query for. See [working with selectors](https://playwright.dev/docs/selectors) for more details. */ $(selector: K): Promise | null>; @@ -180,7 +178,7 @@ export interface Page { * The method finds all elements matching the specified selector within the page. If no elements match the selector, the * return value resolves to `[]`. * - * Shortcut for main frame's [frame.$$(selector)](https://playwright.dev/docs/api/class-frame#frameselector). + * Shortcut for main frame's [frame.$$(selector)](https://playwright.dev/docs/api/class-frame#frame-query-selector-all). * @param selector A selector to query for. See [working with selectors](https://playwright.dev/docs/selectors) for more details. */ $$(selector: K): Promise[]>; @@ -191,8 +189,8 @@ export interface Page { * `pageFunction`. If no elements match the selector, the method throws an error. Returns the value of `pageFunction`. * * If `pageFunction` returns a [Promise], then - * [page.$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-page#pageevalselector-pagefunction-arg) - * would wait for the promise to resolve and return its value. + * [page.$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-eval-on-selector) would wait + * for the promise to resolve and return its value. * * Examples: * @@ -205,7 +203,7 @@ export interface Page { * ``` * * Shortcut for main frame's - * [frame.$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frameevalselector-pagefunction-arg). + * [frame.$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector). * @param selector A selector to query for. See [working with selectors](https://playwright.dev/docs/selectors) for more details. * @param pageFunction Function to be evaluated in the page context. * @param arg Optional argument to pass to `pageFunction`. @@ -220,8 +218,8 @@ export interface Page { * a first argument to `pageFunction`. Returns the result of `pageFunction` invocation. * * If `pageFunction` returns a [Promise], then - * [page.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-page#pageevalselector-pagefunction-arg) - * would wait for the promise to resolve and return its value. + * [page.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all) would + * wait for the promise to resolve and return its value. * * Examples: * @@ -242,7 +240,7 @@ export interface Page { * Returns when the `pageFunction` returns a truthy value. It resolves to a JSHandle of the truthy value. * * The - * [page.waitForFunction(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#pagewaitforfunctionpagefunction-arg-options) + * [page.waitForFunction(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-wait-for-function) * can be used to observe viewport size change: * * ```js @@ -259,7 +257,7 @@ export interface Page { * ``` * * To pass an argument to the predicate of - * [page.waitForFunction(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#pagewaitforfunctionpagefunction-arg-options) + * [page.waitForFunction(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-wait-for-function) * function: * * ```js @@ -268,7 +266,7 @@ export interface Page { * ``` * * Shortcut for main frame's - * [frame.waitForFunction(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#framewaitforfunctionpagefunction-arg-options). + * [frame.waitForFunction(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-wait-for-function). * @param pageFunction Function to be evaluated in the page context. * @param arg Optional argument to pass to `pageFunction`. * @param options @@ -318,12 +316,12 @@ export interface Page { * page: Page, frame: Frame }`. * * See - * [browserContext.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-browsercontext#browsercontextexposebindingname-callback-options) + * [browserContext.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding) * for the context-wide version. * * > NOTE: Functions installed via - * [page.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-page#pageexposebindingname-callback-options) - * survive navigations. + * [page.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-page#page-expose-binding) survive + * navigations. * * An example of exposing page URL to all frames in a page: * @@ -415,13 +413,13 @@ export interface Page { /** * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must** - * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialogacceptprompttext) or - * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialogdismiss) the dialog - otherwise the page will + * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or + * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page will * [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the dialog, and * actions like click will never finish. * - * > NOTE: When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#pageondialog) listeners are present, all - * dialogs are automatically dismissed. + * > NOTE: When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) listeners are present, + * all dialogs are automatically dismissed. */ on(event: 'dialog', listener: (dialog: Dialog) => void): this; @@ -444,8 +442,8 @@ export interface Page { /** * Emitted when a file chooser is supposed to appear, such as after clicking the ``. Playwright can * respond to it via setting the input files using - * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#filechoosersetfilesfiles-options) - * that can be uploaded after that. + * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#file-chooser-set-files) that + * can be uploaded after that. * * ```js * page.on('filechooser', async (fileChooser) => { @@ -483,8 +481,8 @@ export interface Page { /** * Emitted when the page opens a new tab or window. This event is emitted in addition to the - * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browsercontextonpage), but only for - * popups relevant to this page. + * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-page), but only + * for popups relevant to this page. * * The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a * popup with `window.open('http://example.com')`, this event will fire when the network request to "http://example.com" is @@ -499,15 +497,15 @@ export interface Page { * ``` * * > NOTE: Use - * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#pagewaitforloadstatestate-options) - * to wait until the page gets to a particular state (you should not need it in most cases). + * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) to wait + * until the page gets to a particular state (you should not need it in most cases). */ on(event: 'popup', listener: (page: Page) => void): this; /** * Emitted when a page issues a request. The [request] object is read-only. In order to intercept and mutate requests, see - * [page.route(url, handler)](https://playwright.dev/docs/api/class-page#pagerouteurl-handler) or - * [browserContext.route(url, handler)](https://playwright.dev/docs/api/class-browsercontext#browsercontextrouteurl-handler). + * [page.route(url, handler)](https://playwright.dev/docs/api/class-page#page-route) or + * [browserContext.route(url, handler)](https://playwright.dev/docs/api/class-browsercontext#browser-context-route). */ on(event: 'request', listener: (request: Request) => void): this; @@ -515,9 +513,9 @@ export interface Page { * Emitted when a request fails, for example by timing out. * * > NOTE: HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request will - * complete with [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#pageonrequestfinished) event and - * not with [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#pageonrequestfailed). A request will only - * be considered failed when the client cannot get an HTTP response from the server, e.g. due to network error + * complete with [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished) event + * and not with [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed). A request + * will only be considered failed when the client cannot get an HTTP response from the server, e.g. due to network error * net::ERR_FAILED. */ on(event: 'requestfailed', listener: (request: Request) => void): this; @@ -591,13 +589,13 @@ export interface Page { /** * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must** - * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialogacceptprompttext) or - * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialogdismiss) the dialog - otherwise the page will + * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or + * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page will * [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the dialog, and * actions like click will never finish. * - * > NOTE: When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#pageondialog) listeners are present, all - * dialogs are automatically dismissed. + * > NOTE: When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) listeners are present, + * all dialogs are automatically dismissed. */ once(event: 'dialog', listener: (dialog: Dialog) => void): this; @@ -620,8 +618,8 @@ export interface Page { /** * Emitted when a file chooser is supposed to appear, such as after clicking the ``. Playwright can * respond to it via setting the input files using - * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#filechoosersetfilesfiles-options) - * that can be uploaded after that. + * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#file-chooser-set-files) that + * can be uploaded after that. * * ```js * page.on('filechooser', async (fileChooser) => { @@ -659,8 +657,8 @@ export interface Page { /** * Emitted when the page opens a new tab or window. This event is emitted in addition to the - * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browsercontextonpage), but only for - * popups relevant to this page. + * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-page), but only + * for popups relevant to this page. * * The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a * popup with `window.open('http://example.com')`, this event will fire when the network request to "http://example.com" is @@ -675,15 +673,15 @@ export interface Page { * ``` * * > NOTE: Use - * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#pagewaitforloadstatestate-options) - * to wait until the page gets to a particular state (you should not need it in most cases). + * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) to wait + * until the page gets to a particular state (you should not need it in most cases). */ once(event: 'popup', listener: (page: Page) => void): this; /** * Emitted when a page issues a request. The [request] object is read-only. In order to intercept and mutate requests, see - * [page.route(url, handler)](https://playwright.dev/docs/api/class-page#pagerouteurl-handler) or - * [browserContext.route(url, handler)](https://playwright.dev/docs/api/class-browsercontext#browsercontextrouteurl-handler). + * [page.route(url, handler)](https://playwright.dev/docs/api/class-page#page-route) or + * [browserContext.route(url, handler)](https://playwright.dev/docs/api/class-browsercontext#browser-context-route). */ once(event: 'request', listener: (request: Request) => void): this; @@ -691,9 +689,9 @@ export interface Page { * Emitted when a request fails, for example by timing out. * * > NOTE: HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request will - * complete with [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#pageonrequestfinished) event and - * not with [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#pageonrequestfailed). A request will only - * be considered failed when the client cannot get an HTTP response from the server, e.g. due to network error + * complete with [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished) event + * and not with [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed). A request + * will only be considered failed when the client cannot get an HTTP response from the server, e.g. due to network error * net::ERR_FAILED. */ once(event: 'requestfailed', listener: (request: Request) => void): this; @@ -767,13 +765,13 @@ export interface Page { /** * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must** - * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialogacceptprompttext) or - * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialogdismiss) the dialog - otherwise the page will + * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or + * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page will * [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the dialog, and * actions like click will never finish. * - * > NOTE: When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#pageondialog) listeners are present, all - * dialogs are automatically dismissed. + * > NOTE: When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) listeners are present, + * all dialogs are automatically dismissed. */ addListener(event: 'dialog', listener: (dialog: Dialog) => void): this; @@ -796,8 +794,8 @@ export interface Page { /** * Emitted when a file chooser is supposed to appear, such as after clicking the ``. Playwright can * respond to it via setting the input files using - * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#filechoosersetfilesfiles-options) - * that can be uploaded after that. + * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#file-chooser-set-files) that + * can be uploaded after that. * * ```js * page.on('filechooser', async (fileChooser) => { @@ -835,8 +833,8 @@ export interface Page { /** * Emitted when the page opens a new tab or window. This event is emitted in addition to the - * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browsercontextonpage), but only for - * popups relevant to this page. + * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-page), but only + * for popups relevant to this page. * * The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a * popup with `window.open('http://example.com')`, this event will fire when the network request to "http://example.com" is @@ -851,15 +849,15 @@ export interface Page { * ``` * * > NOTE: Use - * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#pagewaitforloadstatestate-options) - * to wait until the page gets to a particular state (you should not need it in most cases). + * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) to wait + * until the page gets to a particular state (you should not need it in most cases). */ addListener(event: 'popup', listener: (page: Page) => void): this; /** * Emitted when a page issues a request. The [request] object is read-only. In order to intercept and mutate requests, see - * [page.route(url, handler)](https://playwright.dev/docs/api/class-page#pagerouteurl-handler) or - * [browserContext.route(url, handler)](https://playwright.dev/docs/api/class-browsercontext#browsercontextrouteurl-handler). + * [page.route(url, handler)](https://playwright.dev/docs/api/class-page#page-route) or + * [browserContext.route(url, handler)](https://playwright.dev/docs/api/class-browsercontext#browser-context-route). */ addListener(event: 'request', listener: (request: Request) => void): this; @@ -867,9 +865,9 @@ export interface Page { * Emitted when a request fails, for example by timing out. * * > NOTE: HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request will - * complete with [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#pageonrequestfinished) event and - * not with [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#pageonrequestfailed). A request will only - * be considered failed when the client cannot get an HTTP response from the server, e.g. due to network error + * complete with [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished) event + * and not with [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed). A request + * will only be considered failed when the client cannot get an HTTP response from the server, e.g. due to network error * net::ERR_FAILED. */ addListener(event: 'requestfailed', listener: (request: Request) => void): this; @@ -943,13 +941,13 @@ export interface Page { /** * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must** - * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialogacceptprompttext) or - * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialogdismiss) the dialog - otherwise the page will + * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or + * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page will * [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the dialog, and * actions like click will never finish. * - * > NOTE: When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#pageondialog) listeners are present, all - * dialogs are automatically dismissed. + * > NOTE: When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) listeners are present, + * all dialogs are automatically dismissed. */ removeListener(event: 'dialog', listener: (dialog: Dialog) => void): this; @@ -972,8 +970,8 @@ export interface Page { /** * Emitted when a file chooser is supposed to appear, such as after clicking the ``. Playwright can * respond to it via setting the input files using - * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#filechoosersetfilesfiles-options) - * that can be uploaded after that. + * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#file-chooser-set-files) that + * can be uploaded after that. * * ```js * page.on('filechooser', async (fileChooser) => { @@ -1011,8 +1009,8 @@ export interface Page { /** * Emitted when the page opens a new tab or window. This event is emitted in addition to the - * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browsercontextonpage), but only for - * popups relevant to this page. + * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-page), but only + * for popups relevant to this page. * * The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a * popup with `window.open('http://example.com')`, this event will fire when the network request to "http://example.com" is @@ -1027,15 +1025,15 @@ export interface Page { * ``` * * > NOTE: Use - * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#pagewaitforloadstatestate-options) - * to wait until the page gets to a particular state (you should not need it in most cases). + * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) to wait + * until the page gets to a particular state (you should not need it in most cases). */ removeListener(event: 'popup', listener: (page: Page) => void): this; /** * Emitted when a page issues a request. The [request] object is read-only. In order to intercept and mutate requests, see - * [page.route(url, handler)](https://playwright.dev/docs/api/class-page#pagerouteurl-handler) or - * [browserContext.route(url, handler)](https://playwright.dev/docs/api/class-browsercontext#browsercontextrouteurl-handler). + * [page.route(url, handler)](https://playwright.dev/docs/api/class-page#page-route) or + * [browserContext.route(url, handler)](https://playwright.dev/docs/api/class-browsercontext#browser-context-route). */ removeListener(event: 'request', listener: (request: Request) => void): this; @@ -1043,9 +1041,9 @@ export interface Page { * Emitted when a request fails, for example by timing out. * * > NOTE: HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request will - * complete with [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#pageonrequestfinished) event and - * not with [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#pageonrequestfailed). A request will only - * be considered failed when the client cannot get an HTTP response from the server, e.g. due to network error + * complete with [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished) event + * and not with [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed). A request + * will only be considered failed when the client cannot get an HTTP response from the server, e.g. due to network error * net::ERR_FAILED. */ removeListener(event: 'requestfailed', listener: (request: Request) => void): this; @@ -1119,13 +1117,13 @@ export interface Page { /** * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must** - * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialogacceptprompttext) or - * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialogdismiss) the dialog - otherwise the page will + * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or + * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page will * [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the dialog, and * actions like click will never finish. * - * > NOTE: When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#pageondialog) listeners are present, all - * dialogs are automatically dismissed. + * > NOTE: When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) listeners are present, + * all dialogs are automatically dismissed. */ off(event: 'dialog', listener: (dialog: Dialog) => void): this; @@ -1148,8 +1146,8 @@ export interface Page { /** * Emitted when a file chooser is supposed to appear, such as after clicking the ``. Playwright can * respond to it via setting the input files using - * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#filechoosersetfilesfiles-options) - * that can be uploaded after that. + * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#file-chooser-set-files) that + * can be uploaded after that. * * ```js * page.on('filechooser', async (fileChooser) => { @@ -1187,8 +1185,8 @@ export interface Page { /** * Emitted when the page opens a new tab or window. This event is emitted in addition to the - * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browsercontextonpage), but only for - * popups relevant to this page. + * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-page), but only + * for popups relevant to this page. * * The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a * popup with `window.open('http://example.com')`, this event will fire when the network request to "http://example.com" is @@ -1203,15 +1201,15 @@ export interface Page { * ``` * * > NOTE: Use - * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#pagewaitforloadstatestate-options) - * to wait until the page gets to a particular state (you should not need it in most cases). + * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) to wait + * until the page gets to a particular state (you should not need it in most cases). */ off(event: 'popup', listener: (page: Page) => void): this; /** * Emitted when a page issues a request. The [request] object is read-only. In order to intercept and mutate requests, see - * [page.route(url, handler)](https://playwright.dev/docs/api/class-page#pagerouteurl-handler) or - * [browserContext.route(url, handler)](https://playwright.dev/docs/api/class-browsercontext#browsercontextrouteurl-handler). + * [page.route(url, handler)](https://playwright.dev/docs/api/class-page#page-route) or + * [browserContext.route(url, handler)](https://playwright.dev/docs/api/class-browsercontext#browser-context-route). */ off(event: 'request', listener: (request: Request) => void): this; @@ -1219,9 +1217,9 @@ export interface Page { * Emitted when a request fails, for example by timing out. * * > NOTE: HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request will - * complete with [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#pageonrequestfinished) event and - * not with [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#pageonrequestfailed). A request will only - * be considered failed when the client cannot get an HTTP response from the server, e.g. due to network error + * complete with [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished) event + * and not with [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed). A request + * will only be considered failed when the client cannot get an HTTP response from the server, e.g. due to network error * net::ERR_FAILED. */ off(event: 'requestfailed', listener: (request: Request) => void): this; @@ -1273,9 +1271,8 @@ export interface Page { * ``` * * > NOTE: The order of evaluation of multiple scripts installed via - * [browserContext.addInitScript(script[, arg])](https://playwright.dev/docs/api/class-browsercontext#browsercontextaddinitscriptscript-arg) - * and [page.addInitScript(script[, arg])](https://playwright.dev/docs/api/class-page#pageaddinitscriptscript-arg) is not - * defined. + * [browserContext.addInitScript(script[, arg])](https://playwright.dev/docs/api/class-browsercontext#browser-context-add-init-script) + * and [page.addInitScript(script[, arg])](https://playwright.dev/docs/api/class-page#page-add-init-script) is not defined. * @param script Script to be evaluated in the page. * @param arg Optional argument to pass to `script` (only supported when passing a function). */ @@ -1297,7 +1294,7 @@ export interface Page { * fires or when the script content was injected into frame. * * Shortcut for main frame's - * [frame.addScriptTag([options])](https://playwright.dev/docs/api/class-frame#frameaddscripttagoptions). + * [frame.addScriptTag([options])](https://playwright.dev/docs/api/class-frame#frame-add-script-tag). * @param options */ addScriptTag(options?: { @@ -1329,7 +1326,7 @@ export interface Page { * content. Returns the added tag when the stylesheet's onload fires or when the CSS content was injected into frame. * * Shortcut for main frame's - * [frame.addStyleTag([options])](https://playwright.dev/docs/api/class-frame#frameaddstyletagoptions). + * [frame.addStyleTag([options])](https://playwright.dev/docs/api/class-frame#frame-add-style-tag). * @param options */ addStyleTag(options?: { @@ -1363,15 +1360,14 @@ export interface Page { * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless `force` option is set. If the * element is detached during the checks, the whole action is retried. * 1. Scroll the element into view if needed. - * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#pagemouse) to click in the center of the element. + * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the element. * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set. * 1. Ensure that the element is now checked. If not, this method throws. * * When all steps combined have not finished during the specified `timeout`, this method throws a [TimeoutError]. Passing * zero timeout disables this. * - * Shortcut for main frame's - * [frame.check(selector[, options])](https://playwright.dev/docs/api/class-frame#framecheckselector-options). + * Shortcut for main frame's [frame.check(selector[, options])](https://playwright.dev/docs/api/class-frame#frame-check). * @param selector A selector to search for element. If there are multiple elements satisfying the selector, the first will be used. See [working with selectors](https://playwright.dev/docs/selectors) for more details. * @param options */ @@ -1401,8 +1397,8 @@ export interface Page { /** * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by * using the - * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browsercontextsetdefaulttimeouttimeout) - * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#pagesetdefaulttimeouttimeout) methods. + * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout) + * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods. */ timeout?: number; @@ -1419,15 +1415,14 @@ export interface Page { * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless `force` option is set. If the * element is detached during the checks, the whole action is retried. * 1. Scroll the element into view if needed. - * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#pagemouse) to click in the center of the element, or + * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the element, or * the specified `position`. * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set. * * When all steps combined have not finished during the specified `timeout`, this method throws a [TimeoutError]. Passing * zero timeout disables this. * - * Shortcut for main frame's - * [frame.click(selector[, options])](https://playwright.dev/docs/api/class-frame#frameclickselector-options). + * Shortcut for main frame's [frame.click(selector[, options])](https://playwright.dev/docs/api/class-frame#frame-click). * @param selector A selector to search for element. If there are multiple elements satisfying the selector, the first will be used. See [working with selectors](https://playwright.dev/docs/selectors) for more details. * @param options */ @@ -1478,8 +1473,8 @@ export interface Page { /** * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by * using the - * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browsercontextsetdefaulttimeouttimeout) - * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#pagesetdefaulttimeouttimeout) methods. + * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout) + * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods. */ timeout?: number; @@ -1497,7 +1492,7 @@ export interface Page { * By default, `page.close()` **does not** run `beforeunload` handlers. * * > NOTE: if `runBeforeUnload` is passed as true, a `beforeunload` dialog might be summoned and should be handled manually - * via [page.on('dialog')](https://playwright.dev/docs/api/class-page#pageondialog) event. + * via [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) event. * @param options */ close(options?: { @@ -1531,7 +1526,7 @@ export interface Page { * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless `force` option is set. If the * element is detached during the checks, the whole action is retried. * 1. Scroll the element into view if needed. - * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#pagemouse) to double click in the center of the + * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to double click in the center of the * element, or the specified `position`. * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set. Note that if the * first click of the `dblclick()` triggers a navigation event, this method will throw. @@ -1542,7 +1537,7 @@ export interface Page { * > NOTE: `page.dblclick()` dispatches two `click` events and a single `dblclick` event. * * Shortcut for main frame's - * [frame.dblclick(selector[, options])](https://playwright.dev/docs/api/class-frame#framedblclickselector-options). + * [frame.dblclick(selector[, options])](https://playwright.dev/docs/api/class-frame#frame-dblclick). * @param selector A selector to search for element. If there are multiple elements satisfying the selector, the first will be used. See [working with selectors](https://playwright.dev/docs/selectors) for more details. * @param options */ @@ -1588,8 +1583,8 @@ export interface Page { /** * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by * using the - * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browsercontextsetdefaulttimeouttimeout) - * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#pagesetdefaulttimeouttimeout) methods. + * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout) + * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods. */ timeout?: number; @@ -1638,8 +1633,8 @@ export interface Page { /** * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by * using the - * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browsercontextsetdefaulttimeouttimeout) - * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#pagesetdefaulttimeouttimeout) methods. + * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout) + * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods. */ timeout?: number; }): Promise; @@ -1706,12 +1701,12 @@ export interface Page { * If the `callback` returns a [Promise], it will be awaited. * * See - * [browserContext.exposeFunction(name, callback)](https://playwright.dev/docs/api/class-browsercontext#browsercontextexposefunctionname-callback) + * [browserContext.exposeFunction(name, callback)](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-function) * for context-wide exposed function. * * > NOTE: Functions installed via - * [page.exposeFunction(name, callback)](https://playwright.dev/docs/api/class-page#pageexposefunctionname-callback) - * survive navigations. + * [page.exposeFunction(name, callback)](https://playwright.dev/docs/api/class-page#page-expose-function) survive + * navigations. * * An example of adding a `sha256` function to the page: * @@ -1752,10 +1747,10 @@ export interface Page { * instead. * * To send fine-grained keyboard events, use - * [page.type(selector, text[, options])](https://playwright.dev/docs/api/class-page#pagetypeselector-text-options). + * [page.type(selector, text[, options])](https://playwright.dev/docs/api/class-page#page-type). * * Shortcut for main frame's - * [frame.fill(selector, value[, options])](https://playwright.dev/docs/api/class-frame#framefillselector-value-options). + * [frame.fill(selector, value[, options])](https://playwright.dev/docs/api/class-frame#frame-fill). * @param selector A selector to search for element. If there are multiple elements satisfying the selector, the first will be used. See [working with selectors](https://playwright.dev/docs/selectors) for more details. * @param value Value to fill for the ``, `