diff --git a/docs/src/api/class-elementhandle.md b/docs/src/api/class-elementhandle.md index 7e464a1063f05..ef669e663d947 100644 --- a/docs/src/api/class-elementhandle.md +++ b/docs/src/api/class-elementhandle.md @@ -62,7 +62,7 @@ ElementHandle instances can be used as an argument in [`method: Page.$eval`] and - returns: <[null]|[ElementHandle]> The method finds an element matching the specified selector in the `ElementHandle`'s subtree. See -[Working with selectors](./selectors.md#working-with-selectors) for more details. If no elements match the selector, +[Working with selectors](./selectors.md) for more details. If no elements match the selector, returns `null`. ### param: ElementHandle.$.selector = %%-query-selector-%% @@ -73,7 +73,7 @@ returns `null`. - returns: <[Array]<[ElementHandle]>> The method finds all elements matching the specified selector in the `ElementHandle`s subtree. See -[Working with selectors](./selectors.md#working-with-selectors) for more details. If no elements match the selector, +[Working with selectors](./selectors.md) for more details. If no elements match the selector, returns empty array. ### param: ElementHandle.$$.selector = %%-query-selector-%% @@ -86,7 +86,7 @@ returns empty array. Returns the return value of [`param: pageFunction`] The method finds an element matching the specified selector in the `ElementHandle`s subtree and passes it as a first -argument to [`param: pageFunction`]. See [Working with selectors](./selectors.md#working-with-selectors) for more +argument to [`param: pageFunction`]. See [Working with selectors](./selectors.md) for more details. If no elements match the selector, the method throws an error. If [`param: pageFunction`] returns a [Promise], then `frame.$eval` would wait for the promise to resolve and return its @@ -134,7 +134,7 @@ Returns the return value of [`param: pageFunction`] The method finds all elements matching the specified selector in the `ElementHandle`'s subtree and passes an array of matched elements as a first argument to [`param: pageFunction`]. See -[Working with selectors](./selectors.md#working-with-selectors) for more details. +[Working with selectors](./selectors.md) for more details. If [`param: pageFunction`] returns a [Promise], then `frame.$$eval` would wait for the promise to resolve and return its value. diff --git a/docs/src/api/class-frame.md b/docs/src/api/class-frame.md index 5485606f864ff..4116e7b0e1de9 100644 --- a/docs/src/api/class-frame.md +++ b/docs/src/api/class-frame.md @@ -82,7 +82,7 @@ with sync_playwright() as playwright: Returns the ElementHandle pointing to the frame element. The method finds an element matching the specified selector within the frame. See -[Working with selectors](./selectors.md#working-with-selectors) for more details. If no elements match the selector, +[Working with selectors](./selectors.md) for more details. If no elements match the selector, returns `null`. ### param: Frame.$.selector = %%-query-selector-%% @@ -95,7 +95,7 @@ returns `null`. Returns the ElementHandles pointing to the frame elements. The method finds all elements matching the specified selector within the frame. See -[Working with selectors](./selectors.md#working-with-selectors) for more details. If no elements match the selector, +[Working with selectors](./selectors.md) for more details. If no elements match the selector, returns empty array. ### param: Frame.$$.selector = %%-query-selector-%% @@ -108,7 +108,7 @@ returns empty array. Returns the return value of [`param: pageFunction`] The method finds an element matching the specified selector within the frame and passes it as a first argument to -[`param: pageFunction`]. See [Working with selectors](./selectors.md#working-with-selectors) for more details. If no +[`param: pageFunction`]. See [Working with selectors](./selectors.md) for more details. If no elements match the selector, the method throws an error. If [`param: pageFunction`] returns a [Promise], then `frame.$eval` would wait for the promise to resolve and return its @@ -155,7 +155,7 @@ Optional argument to pass to [`param: pageFunction`] Returns the return value of [`param: pageFunction`] The method finds all elements matching the specified selector within the frame and passes an array of matched elements -as a first argument to [`param: pageFunction`]. See [Working with selectors](./selectors.md#working-with-selectors) for +as a first argument to [`param: pageFunction`]. See [Working with selectors](./selectors.md) for more details. If [`param: pageFunction`] returns a [Promise], then `frame.$$eval` would wait for the promise to resolve and return its @@ -416,9 +416,9 @@ Returns the return value of [`param: pageFunction`] If the function passed to the [`method: Frame.evaluate`] returns a [Promise], then [`method: Frame.evaluate`] would wait for the promise to resolve and return its value. -If the function passed to the [`method: Frame.evaluate`] returns a non-[Serializable] value, then[ method: `Frame.evaluate`] returns -`undefined`. DevTools Protocol also supports transferring some additional values that are not serializable by `JSON`: -`-0`, `NaN`, `Infinity`, `-Infinity`, and bigint literals. +If the function passed to the [`method: Frame.evaluate`] returns a non-[Serializable] value, then +[`method: Frame.evaluate`] returns `undefined`. DevTools Protocol also supports transferring some additional values that +are not serializable by `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`, and bigint literals. ```js const result = await frame.evaluate(([x, y]) => { @@ -493,11 +493,11 @@ Optional argument to pass to [`param: pageFunction`] Returns the return value of [`param: pageFunction`] as in-page object (JSHandle). -The only difference between [`method: Frame.evaluate`] and [`method: Frame.evaluateHandle`] is that[ method: Fframe.evaluateHandle`] returns in-page -object (JSHandle). +The only difference between [`method: Frame.evaluate`] and [`method: Frame.evaluateHandle`] is that +[method: Frame.evaluateHandle`] returns in-page object (JSHandle). -If the function, passed to the [`method: Frame.evaluateHandle`], returns a [Promise], then[ method: Fframe.evaluateHandle`] would wait for -the promise to resolve and return its value. +If the function, passed to the [`method: Frame.evaluateHandle`], returns a [Promise], then +[`method: Frame.evaluateHandle`] would wait for the promise to resolve and return its value. ```js const aWindowHandle = await frame.evaluateHandle(() => Promise.resolve(window)); @@ -1024,7 +1024,7 @@ Returns frame's url. Returns when the [`param: pageFunction`] returns a truthy value, returns that value. -The `waitForFunction` can be used to observe viewport size change: +The [`method: Frame.waitForFunction`] can be used to observe viewport size change: ```js const { firefox } = require('playwright'); // Or 'chromium' or 'webkit'. diff --git a/docs/src/api/class-page.md b/docs/src/api/class-page.md index d2c4bc234ed66..e98ffa6879562 100644 --- a/docs/src/api/class-page.md +++ b/docs/src/api/class-page.md @@ -829,12 +829,12 @@ page.evaluate("matchMedia('(prefers-color-scheme: no-preference)').matches") Returns the value of the [`param: pageFunction`] invocation. -If the function passed to the [`method: Page.evaluate`] returns a [Promise], then [`method: Page.evaluate`] would wait for the promise to -resolve and return its value. +If the function passed to the [`method: Page.evaluate`] returns a [Promise], then [`method: Page.evaluate`] would wait +for the promise to resolve and return its value. -If the function passed to the [`method: Page.evaluate`] returns a non-[Serializable] value, then[ method: `Page.evaluate`] resolves to -`undefined`. DevTools Protocol also supports transferring some additional values that are not serializable by `JSON`: -`-0`, `NaN`, `Infinity`, `-Infinity`, and bigint literals. +If the function passed to the [`method: Page.evaluate`] returns a non-[Serializable] value, then +[`method: Page.evaluate`] resolves to `undefined`. DevTools Protocol also supports transferring some additional values +that are not serializable by `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`, and bigint literals. Passing argument to [`param: pageFunction`]: @@ -2206,7 +2206,7 @@ Either a predicate that receives an event or an options object. Optional. Returns when the [`param: pageFunction`] returns a truthy value. It resolves to a JSHandle of the truthy value. -The `waitForFunction` can be used to observe viewport size change: +The [`method: Page.waitForFunction`] can be used to observe viewport size change: ```js const { webkit } = require('playwright'); // Or 'chromium' or 'firefox'. diff --git a/docs/src/api/class-playwright.md b/docs/src/api/class-playwright.md index d642e6f7da74c..18eb2fce1b850 100644 --- a/docs/src/api/class-playwright.md +++ b/docs/src/api/class-playwright.md @@ -157,7 +157,7 @@ This object can be used to launch or connect to Firefox, returning instances of - type: <[Selectors]> Selectors can be used to install custom selector engines. See -[Working with selectors](./selectors.md#working-with-selectors) for more information. +[Working with selectors](./selectors.md) for more information. ## property: Playwright.webkit - type: <[BrowserType]> diff --git a/docs/src/api/class-selectors.md b/docs/src/api/class-selectors.md index 4d08eef880468..a9f7f1fff2437 100644 --- a/docs/src/api/class-selectors.md +++ b/docs/src/api/class-selectors.md @@ -1,7 +1,7 @@ # class: Selectors Selectors can be used to install custom selector engines. See -[Working with selectors](./selectors.md#working-with-selectors) for more information. +[Working with selectors](./selectors.md) for more information. ## async method: Selectors.register diff --git a/docs/src/api/params.md b/docs/src/api/params.md index 7c6bb9aee16ee..228f354ae2fea 100644 --- a/docs/src/api/params.md +++ b/docs/src/api/params.md @@ -45,7 +45,7 @@ Whether to bypass the [actionability](./actionability.md) checks. Defaults to `f - `selector` <[string]> A selector to search for element. If there are multiple elements satisfying the selector, the first will be used. See -[working with selectors](./selectors.md#working-with-selectors) for more details. +[working with selectors](./selectors.md) for more details. ## input-position - `position` <[Object]> @@ -85,7 +85,7 @@ defaults to 1. See [UIEvent.detail]. ## query-selector - `selector` <[string]> -A selector to query for. See [working with selectors](./selectors.md#working-with-selectors) for more details. +A selector to query for. See [working with selectors](./selectors.md) for more details. ## wait-for-selector-state - `state` <"attached"|"detached"|"visible"|"hidden"> diff --git a/types/types.d.ts b/types/types.d.ts index 2f2b8ac75495f..da826c96c8c35 100644 --- a/types/types.d.ts +++ b/types/types.d.ts @@ -76,15 +76,17 @@ export interface Page { * Returns the value of the `pageFunction` invocation. * * If the function passed to the - * [page.evaluate(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageevaluate) returns a [Promise], - * then [page.evaluate(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageevaluate) would wait for the - * promise to resolve and return its value. + * [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. * * If the function passed to the - * [page.evaluate(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageevaluate) returns a - * non-[Serializable] value, then[ method: `Page.evaluate`] resolves to `undefined`. DevTools Protocol also supports - * transferring some additional values that are not serializable by `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`, and - * bigint literals. + * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#pageevaluatepagefunction-arg) returns a + * non-[Serializable] value, then + * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#pageevaluatepagefunction-arg) resolves + * to `undefined`. DevTools Protocol also supports transferring some additional values that are not serializable by `JSON`: + * `-0`, `NaN`, `Infinity`, `-Infinity`, and bigint literals. * * Passing argument to `pageFunction`: * @@ -104,7 +106,7 @@ export interface Page { * ``` * * [ElementHandle] instances can be passed as an argument to the - * [page.evaluate(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageevaluate): + * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#pageevaluatepagefunction-arg): * * ```js * const bodyHandle = await page.$('body'); @@ -113,7 +115,7 @@ export interface Page { * ``` * * Shortcut for main frame's - * [frame.evaluate(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#frameevaluate). + * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frameevaluatepagefunction-arg). * @param pageFunction Function to be evaluated in the page context * @param arg Optional argument to pass to `pageFunction` */ @@ -124,16 +126,17 @@ export interface Page { * Returns the value of the `pageFunction` invocation as in-page object (JSHandle). * * The only difference between - * [page.evaluate(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageevaluate) and - * [page.evaluateHandle(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageevaluatehandle) is that - * [page.evaluateHandle(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageevaluatehandle) returns - * in-page object (JSHandle). + * [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 in-page object (JSHandle). * * If the function passed to the - * [page.evaluateHandle(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageevaluatehandle) returns a - * [Promise], then - * [page.evaluateHandle(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageevaluatehandle) would wait - * for the promise to resolve and return its value. + * [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. * * ```js * const aWindowHandle = await page.evaluateHandle(() => Promise.resolve(window)); @@ -147,7 +150,7 @@ export interface Page { * ``` * * [JSHandle] instances can be passed as an argument to the - * [page.evaluateHandle(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageevaluatehandle): + * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#pageevaluatehandlepagefunction-arg): * * ```js * const aHandle = await page.evaluateHandle(() => document.body); @@ -166,8 +169,8 @@ 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`. * - * Shortcut for main frame's [frame.$(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#frame). - * @param selector A selector to query for. See [working with selectors](https://github.com/microsoft/playwright/blob/master/docs/selectors.md#working-with-selectors) for more details. + * Shortcut for main frame's [frame.$(selector)](https://playwright.dev/docs/api/class-frame#frameselector). + * @param selector A selector to query for. See [working with selectors](https://playwright.dev/docs/selectors) for more details. */ $(selector: K): Promise | null>; $(selector: string): Promise | null>; @@ -176,8 +179,8 @@ 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.$$(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#frame). - * @param selector A selector to query for. See [working with selectors](https://github.com/microsoft/playwright/blob/master/docs/selectors.md#working-with-selectors) for more details. + * Shortcut for main frame's [frame.$$(selector)](https://playwright.dev/docs/api/class-frame#frameselector). + * @param selector A selector to query for. See [working with selectors](https://playwright.dev/docs/selectors) for more details. */ $$(selector: K): Promise[]>; $$(selector: string): Promise[]>; @@ -187,8 +190,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(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageeval) would wait for the promise to - * resolve and return its value. + * [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. * * Examples: * @@ -198,8 +201,9 @@ export interface Page { * const html = await page.$eval('.main-container', (e, suffix) => e.outerHTML + suffix, 'hello'); * ``` * - * Shortcut for main frame's [frame.$eval(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#frameeval). - * @param selector A selector to query for. See [working with selectors](https://github.com/microsoft/playwright/blob/master/docs/selectors.md#working-with-selectors) for more details. + * Shortcut for main frame's + * [frame.$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frameevalselector-pagefunction-arg). + * @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 browser context * @param arg Optional argument to pass to `pageFunction` */ @@ -213,8 +217,8 @@ export interface Page { * a first argument to `pageFunction`. Returns the result of `pageFunction` invocation. * * If `pageFunction` returns a [Promise], then - * [page.$$eval(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageeval) would wait for the promise to - * resolve and return its value. + * [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. * * Examples: * @@ -222,7 +226,7 @@ export interface Page { * const divCounts = await page.$$eval('div', (divs, min) => divs.length >= min, 10); * ``` * - * @param selector A selector to query for. See [working with selectors](https://github.com/microsoft/playwright/blob/master/docs/selectors.md#working-with-selectors) for more details. + * @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 browser context * @param arg Optional argument to pass to `pageFunction` */ @@ -234,7 +238,9 @@ export interface Page { /** * Returns when the `pageFunction` returns a truthy value. It resolves to a JSHandle of the truthy value. * - * The `waitForFunction` can be used to observe viewport size change: + * The + * [page.waitForFunction(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#pagewaitforfunctionpagefunction-arg-options) + * can be used to observe viewport size change: * * ```js * const { webkit } = require('playwright'); // Or 'chromium' or 'firefox'. @@ -250,7 +256,8 @@ export interface Page { * ``` * * To pass an argument to the predicate of - * [page.waitForFunction(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pagewaitforfunction) function: + * [page.waitForFunction(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#pagewaitforfunctionpagefunction-arg-options) + * function: * * ```js * const selector = '.foo'; @@ -258,7 +265,7 @@ export interface Page { * ``` * * Shortcut for main frame's - * [frame.waitForFunction(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#framewaitforfunction). + * [frame.waitForFunction(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#framewaitforfunctionpagefunction-arg-options). * @param pageFunction Function to be evaluated in browser context * @param arg Optional argument to pass to `pageFunction` * @param options @@ -291,7 +298,7 @@ export interface Page { * })(); * ``` * - * @param selector A selector to query for. See [working with selectors](https://github.com/microsoft/playwright/blob/master/docs/selectors.md#working-with-selectors) for more details. + * @param selector A selector to query for. See [working with selectors](https://playwright.dev/docs/selectors) for more details. * @param options */ waitForSelector(selector: K, options?: PageWaitForSelectorOptionsNotHidden): Promise>; @@ -308,12 +315,12 @@ export interface Page { * page: Page, frame: Frame }`. * * See - * [browserContext.exposeBinding(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#browsercontextexposebinding) + * [browserContext.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-browsercontext#browsercontextexposebindingname-callback-options) * for the context-wide version. * * > NOTE: Functions installed via - * [page.exposeBinding(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageexposebinding) survive - * navigations. + * [page.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-page#pageexposebindingname-callback-options) + * survive navigations. * * An example of exposing page URL to all frames in a page: * @@ -405,8 +412,8 @@ export interface Page { /** * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Playwright can respond - * to the dialog via [dialog.accept(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#dialogaccept) or - * [dialog.dismiss(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#dialogdismiss) methods. + * to the dialog via [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialogacceptprompttext) or + * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialogdismiss) methods. */ on(event: 'dialog', listener: (dialog: Dialog) => void): this; @@ -429,8 +436,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(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#filechoosersetfiles) that can - * be uploaded after that. + * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#filechoosersetfilesfiles-options) + * that can be uploaded after that. * * ```js * page.on('filechooser', async (fileChooser) => { @@ -468,8 +475,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://github.com/microsoft/playwright/blob/master/docs/api.md#browsercontextonpage), but - * only for popups relevant to this page. + * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browsercontextonpage), 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 @@ -484,15 +491,15 @@ export interface Page { * ``` * * > NOTE: Use - * [page.waitForLoadState(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pagewaitforloadstate) 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#pagewaitforloadstatestate-options) + * 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(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageroute) or - * [browserContext.route(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#browsercontextroute). + * [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). */ on(event: 'request', listener: (request: Request) => void): this; @@ -500,10 +507,8 @@ 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://github.com/microsoft/playwright/blob/master/docs/api.md#pageonrequestfinished) - * event and not with - * [page.on('requestfailed')](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageonrequestfailed). + * 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). */ on(event: 'requestfailed', listener: (request: Request) => void): this; @@ -576,8 +581,8 @@ export interface Page { /** * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Playwright can respond - * to the dialog via [dialog.accept(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#dialogaccept) or - * [dialog.dismiss(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#dialogdismiss) methods. + * to the dialog via [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialogacceptprompttext) or + * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialogdismiss) methods. */ once(event: 'dialog', listener: (dialog: Dialog) => void): this; @@ -600,8 +605,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(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#filechoosersetfiles) that can - * be uploaded after that. + * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#filechoosersetfilesfiles-options) + * that can be uploaded after that. * * ```js * page.on('filechooser', async (fileChooser) => { @@ -639,8 +644,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://github.com/microsoft/playwright/blob/master/docs/api.md#browsercontextonpage), but - * only for popups relevant to this page. + * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browsercontextonpage), 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 @@ -655,15 +660,15 @@ export interface Page { * ``` * * > NOTE: Use - * [page.waitForLoadState(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pagewaitforloadstate) 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#pagewaitforloadstatestate-options) + * 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(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageroute) or - * [browserContext.route(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#browsercontextroute). + * [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). */ once(event: 'request', listener: (request: Request) => void): this; @@ -671,10 +676,8 @@ 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://github.com/microsoft/playwright/blob/master/docs/api.md#pageonrequestfinished) - * event and not with - * [page.on('requestfailed')](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageonrequestfailed). + * 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). */ once(event: 'requestfailed', listener: (request: Request) => void): this; @@ -747,8 +750,8 @@ export interface Page { /** * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Playwright can respond - * to the dialog via [dialog.accept(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#dialogaccept) or - * [dialog.dismiss(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#dialogdismiss) methods. + * to the dialog via [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialogacceptprompttext) or + * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialogdismiss) methods. */ addListener(event: 'dialog', listener: (dialog: Dialog) => void): this; @@ -771,8 +774,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(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#filechoosersetfiles) that can - * be uploaded after that. + * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#filechoosersetfilesfiles-options) + * that can be uploaded after that. * * ```js * page.on('filechooser', async (fileChooser) => { @@ -810,8 +813,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://github.com/microsoft/playwright/blob/master/docs/api.md#browsercontextonpage), but - * only for popups relevant to this page. + * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browsercontextonpage), 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 @@ -826,15 +829,15 @@ export interface Page { * ``` * * > NOTE: Use - * [page.waitForLoadState(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pagewaitforloadstate) 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#pagewaitforloadstatestate-options) + * 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(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageroute) or - * [browserContext.route(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#browsercontextroute). + * [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). */ addListener(event: 'request', listener: (request: Request) => void): this; @@ -842,10 +845,8 @@ 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://github.com/microsoft/playwright/blob/master/docs/api.md#pageonrequestfinished) - * event and not with - * [page.on('requestfailed')](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageonrequestfailed). + * 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). */ addListener(event: 'requestfailed', listener: (request: Request) => void): this; @@ -918,8 +919,8 @@ export interface Page { /** * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Playwright can respond - * to the dialog via [dialog.accept(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#dialogaccept) or - * [dialog.dismiss(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#dialogdismiss) methods. + * to the dialog via [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialogacceptprompttext) or + * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialogdismiss) methods. */ removeListener(event: 'dialog', listener: (dialog: Dialog) => void): this; @@ -942,8 +943,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(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#filechoosersetfiles) that can - * be uploaded after that. + * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#filechoosersetfilesfiles-options) + * that can be uploaded after that. * * ```js * page.on('filechooser', async (fileChooser) => { @@ -981,8 +982,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://github.com/microsoft/playwright/blob/master/docs/api.md#browsercontextonpage), but - * only for popups relevant to this page. + * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browsercontextonpage), 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 @@ -997,15 +998,15 @@ export interface Page { * ``` * * > NOTE: Use - * [page.waitForLoadState(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pagewaitforloadstate) 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#pagewaitforloadstatestate-options) + * 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(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageroute) or - * [browserContext.route(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#browsercontextroute). + * [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). */ removeListener(event: 'request', listener: (request: Request) => void): this; @@ -1013,10 +1014,8 @@ 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://github.com/microsoft/playwright/blob/master/docs/api.md#pageonrequestfinished) - * event and not with - * [page.on('requestfailed')](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageonrequestfailed). + * 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). */ removeListener(event: 'requestfailed', listener: (request: Request) => void): this; @@ -1089,8 +1088,8 @@ export interface Page { /** * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Playwright can respond - * to the dialog via [dialog.accept(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#dialogaccept) or - * [dialog.dismiss(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#dialogdismiss) methods. + * to the dialog via [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialogacceptprompttext) or + * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialogdismiss) methods. */ off(event: 'dialog', listener: (dialog: Dialog) => void): this; @@ -1113,8 +1112,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(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#filechoosersetfiles) that can - * be uploaded after that. + * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#filechoosersetfilesfiles-options) + * that can be uploaded after that. * * ```js * page.on('filechooser', async (fileChooser) => { @@ -1152,8 +1151,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://github.com/microsoft/playwright/blob/master/docs/api.md#browsercontextonpage), but - * only for popups relevant to this page. + * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browsercontextonpage), 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 @@ -1168,15 +1167,15 @@ export interface Page { * ``` * * > NOTE: Use - * [page.waitForLoadState(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pagewaitforloadstate) 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#pagewaitforloadstatestate-options) + * 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(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageroute) or - * [browserContext.route(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#browsercontextroute). + * [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). */ off(event: 'request', listener: (request: Request) => void): this; @@ -1184,10 +1183,8 @@ 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://github.com/microsoft/playwright/blob/master/docs/api.md#pageonrequestfinished) - * event and not with - * [page.on('requestfailed')](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageonrequestfailed). + * 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). */ off(event: 'requestfailed', listener: (request: Request) => void): this; @@ -1238,8 +1235,8 @@ export interface Page { * ``` * * > NOTE: The order of evaluation of multiple scripts installed via - * [browserContext.addInitScript(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#browsercontextaddinitscript) - * and [page.addInitScript(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageaddinitscript) is not + * [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. * @param script Script to be evaluated in the page. * @param arg Optional argument to pass to `script` (only supported when passing a function). @@ -1262,7 +1259,7 @@ export interface Page { * fires or when the script content was injected into frame. * * Shortcut for main frame's - * [frame.addScriptTag(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#frameaddscripttag). + * [frame.addScriptTag([options])](https://playwright.dev/docs/api/class-frame#frameaddscripttagoptions). * @param options */ addScriptTag(options?: { @@ -1294,7 +1291,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(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#frameaddstyletag). + * [frame.addStyleTag([options])](https://playwright.dev/docs/api/class-frame#frameaddstyletagoptions). * @param options */ addStyleTag(options?: { @@ -1325,24 +1322,24 @@ export interface Page { * 1. Find an element match matching `selector`. If there is none, wait until a matching element is attached to the DOM. * 1. Ensure that matched element is a checkbox or a radio input. If not, this method rejects. If the element is already * checked, this method returns immediately. - * 1. Wait for [actionability](https://github.com/microsoft/playwright/blob/master/docs/actionability.md) checks on the matched element, unless `force` option is set. If the + * 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://github.com/microsoft/playwright/blob/master/docs/api.md#pagemouse) to click in the center - * of the element. + * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#pagemouse) 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 rejects. * * When all steps combined have not finished during the specified `timeout`, this method rejects with a [TimeoutError]. * Passing zero timeout disables this. * - * Shortcut for main frame's [frame.check(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#framecheck). - * @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://github.com/microsoft/playwright/blob/master/docs/selectors.md#working-with-selectors) for more details. + * Shortcut for main frame's + * [frame.check(selector[, options])](https://playwright.dev/docs/api/class-frame#framecheckselector-options). + * @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 */ check(selector: string, options?: { /** - * Whether to bypass the [actionability](https://github.com/microsoft/playwright/blob/master/docs/actionability.md) checks. Defaults to `false`. + * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`. */ force?: boolean; @@ -1356,9 +1353,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(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#browsercontextsetdefaulttimeout) - * or [page.setDefaultTimeout(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pagesetdefaulttimeout) - * methods. + * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browsercontextsetdefaulttimeouttimeout) + * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#pagesetdefaulttimeouttimeout) methods. */ timeout?: number; }): Promise; @@ -1366,18 +1362,19 @@ export interface Page { /** * This method clicks an element matching `selector` by performing the following steps: * 1. Find an element match matching `selector`. If there is none, wait until a matching element is attached to the DOM. - * 1. Wait for [actionability](https://github.com/microsoft/playwright/blob/master/docs/actionability.md) checks on the matched element, unless `force` option is set. If the + * 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://github.com/microsoft/playwright/blob/master/docs/api.md#pagemouse) to click in the center - * of the element, or the specified `position`. + * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#pagemouse) 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 rejects with a [TimeoutError]. * Passing zero timeout disables this. * - * Shortcut for main frame's [frame.click(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#frameclick). - * @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://github.com/microsoft/playwright/blob/master/docs/selectors.md#working-with-selectors) for more details. + * Shortcut for main frame's + * [frame.click(selector[, options])](https://playwright.dev/docs/api/class-frame#frameclickselector-options). + * @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 */ click(selector: string, options?: { @@ -1397,7 +1394,7 @@ export interface Page { delay?: number; /** - * Whether to bypass the [actionability](https://github.com/microsoft/playwright/blob/master/docs/actionability.md) checks. Defaults to `false`. + * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`. */ force?: boolean; @@ -1427,9 +1424,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(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#browsercontextsetdefaulttimeout) - * or [page.setDefaultTimeout(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pagesetdefaulttimeout) - * methods. + * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browsercontextsetdefaulttimeouttimeout) + * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#pagesetdefaulttimeouttimeout) methods. */ timeout?: number; }): Promise; @@ -1441,7 +1437,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://github.com/microsoft/playwright/blob/master/docs/api.md#pageondialog) event. + * via [page.on('dialog')](https://playwright.dev/docs/api/class-page#pageondialog) event. * @param options */ close(options?: { @@ -1464,18 +1460,18 @@ export interface Page { /** * Browser-specific Coverage implementation, only available for Chromium atm. See - * [ChromiumCoverage](https://github.com/microsoft/playwright/blob/master/docs/api.md#class-chromiumcoverage) for more details. + * [ChromiumCoverage](#class-chromiumcoverage) for more details. */ coverage: null|ChromiumCoverage; /** * This method double clicks an element matching `selector` by performing the following steps: * 1. Find an element match matching `selector`. If there is none, wait until a matching element is attached to the DOM. - * 1. Wait for [actionability](https://github.com/microsoft/playwright/blob/master/docs/actionability.md) checks on the matched element, unless `force` option is set. If the + * 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://github.com/microsoft/playwright/blob/master/docs/api.md#pagemouse) to double click in the - * center of the element, or the specified `position`. + * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#pagemouse) 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 reject. * @@ -1485,8 +1481,8 @@ export interface Page { * > NOTE: `page.dblclick()` dispatches two `click` events and a single `dblclick` event. * * Shortcut for main frame's - * [frame.dblclick(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#framedblclick). - * @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://github.com/microsoft/playwright/blob/master/docs/selectors.md#working-with-selectors) for more details. + * [frame.dblclick(selector[, options])](https://playwright.dev/docs/api/class-frame#framedblclickselector-options). + * @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 */ dblclick(selector: string, options?: { @@ -1501,7 +1497,7 @@ export interface Page { delay?: number; /** - * Whether to bypass the [actionability](https://github.com/microsoft/playwright/blob/master/docs/actionability.md) checks. Defaults to `false`. + * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`. */ force?: boolean; @@ -1531,9 +1527,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(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#browsercontextsetdefaulttimeout) - * or [page.setDefaultTimeout(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pagesetdefaulttimeout) - * methods. + * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browsercontextsetdefaulttimeouttimeout) + * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#pagesetdefaulttimeouttimeout) methods. */ timeout?: number; }): Promise; @@ -1567,7 +1562,7 @@ export interface Page { * await page.dispatchEvent('#source', 'dragstart', { dataTransfer }); * ``` * - * @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://github.com/microsoft/playwright/blob/master/docs/selectors.md#working-with-selectors) for more details. + * @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 type DOM event type: `"click"`, `"dragstart"`, etc. * @param eventInit Optional event-specific initialization properties. * @param options @@ -1576,9 +1571,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(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#browsercontextsetdefaulttimeout) - * or [page.setDefaultTimeout(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pagesetdefaulttimeout) - * methods. + * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browsercontextsetdefaulttimeouttimeout) + * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#pagesetdefaulttimeouttimeout) methods. */ timeout?: number; }): Promise; @@ -1637,12 +1631,12 @@ export interface Page { * If the `callback` returns a [Promise], it will be awaited. * * See - * [browserContext.exposeFunction(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#browsercontextexposefunction) + * [browserContext.exposeFunction(name, callback)](https://playwright.dev/docs/api/class-browsercontext#browsercontextexposefunctionname-callback) * for context-wide exposed function. * * > NOTE: Functions installed via - * [page.exposeFunction(…)](https://github.com/microsoft/playwright/blob/master/docs/api.md#pageexposefunction) survive - * navigations. + * [page.exposeFunction(name, callback)](https://playwright.dev/docs/api/class-page#pageexposefunctionname-callback) + * survive navigations. * * An example of adding an `sha1` function to the page: * @@ -1673,16 +1667,17 @@ export interface Page { exposeFunction(name: string, callback: Function): Promise; /** - * This method waits for an element matching `selector`, waits for [actionability](https://github.com/microsoft/playwright/blob/master/docs/actionability.md) checks, focuses the + * This method waits for an element matching `selector`, waits for [actionability](https://playwright.dev/docs/actionability) checks, focuses the * element, fills it and triggers an `input` event after filling. If the element matching `selector` is not an ``, * `