From db09275d89d0827a9220ad064e6ad3ada7fb7583 Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Thu, 8 Apr 2021 16:42:45 -0700 Subject: [PATCH] docs: reject -> throw, fix small typos (#6152) --- docs/src/api/class-elementhandle.md | 34 +++---- docs/src/api/class-frame.md | 34 +++---- docs/src/api/class-page.md | 34 +++---- types/types.d.ts | 140 ++++++++++++++-------------- 4 files changed, 121 insertions(+), 121 deletions(-) diff --git a/docs/src/api/class-elementhandle.md b/docs/src/api/class-elementhandle.md index 75b3d721f1..f418307a45 100644 --- a/docs/src/api/class-elementhandle.md +++ b/docs/src/api/class-elementhandle.md @@ -117,17 +117,17 @@ page.mouse.click(box["x"] + box["width"] / 2, box["y"] + box["height"] / 2) ## async method: ElementHandle.check This method checks the element by performing the following steps: -1. Ensure that element is a checkbox or a radio input. If not, this method rejects. If the element is already +1. Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already checked, this method returns immediately. 1. Wait for [actionability](./actionability.md) checks on the element, unless [`option: force`] option is set. 1. Scroll the element into view if needed. 1. Use [`property: Page.mouse`] to click in the center of the element. 1. Wait for initiated navigations to either succeed or fail, unless [`option: noWaitAfter`] option is set. -1. Ensure that the element is now checked. If not, this method rejects. +1. Ensure that the element is now checked. If not, this method throws. -If the element is detached from the DOM at any moment during the action, this method rejects. +If the element is detached from the DOM at any moment during the action, this method throws. -When all steps combined have not finished during the specified [`option: timeout`], this method rejects with a +When all steps combined have not finished during the specified [`option: timeout`], this method throws a [TimeoutError]. Passing zero timeout disables this. ### option: ElementHandle.check.force = %%-input-force-%% @@ -144,9 +144,9 @@ This method clicks the element by performing the following steps: 1. Use [`property: Page.mouse`] to click in the center of the element, or the specified [`option: position`]. 1. Wait for initiated navigations to either succeed or fail, unless [`option: noWaitAfter`] option is set. -If the element is detached from the DOM at any moment during the action, this method rejects. +If the element is detached from the DOM at any moment during the action, this method throws. -When all steps combined have not finished during the specified [`option: timeout`], this method rejects with a +When all steps combined have not finished during the specified [`option: timeout`], this method throws a [TimeoutError]. Passing zero timeout disables this. ### option: ElementHandle.click.button = %%-input-button-%% @@ -179,11 +179,11 @@ This method double clicks the element by performing the following steps: 1. Scroll the element into view if needed. 1. Use [`property: Page.mouse`] to double click in the center of the element, or the specified [`option: position`]. 1. Wait for initiated navigations to either succeed or fail, unless [`option: noWaitAfter`] option is set. Note that - if the first click of the `dblclick()` triggers a navigation event, this method will reject. + if the first click of the `dblclick()` triggers a navigation event, this method will throw. -If the element is detached from the DOM at any moment during the action, this method rejects. +If the element is detached from the DOM at any moment during the action, this method throws. -When all steps combined have not finished during the specified [`option: timeout`], this method rejects with a +When all steps combined have not finished during the specified [`option: timeout`], this method throws a [TimeoutError]. Passing zero timeout disables this. :::note @@ -419,9 +419,9 @@ This method hovers over the element by performing the following steps: 1. Use [`property: Page.mouse`] to hover over the center of the element, or the specified [`option: position`]. 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set. -If the element is detached from the DOM at any moment during the action, this method rejects. +If the element is detached from the DOM at any moment during the action, this method throws. -When all steps combined have not finished during the specified [`option: timeout`], this method rejects with a +When all steps combined have not finished during the specified [`option: timeout`], this method throws a [TimeoutError]. Passing zero timeout disables this. ### option: ElementHandle.hover.position = %%-input-position-%% @@ -672,9 +672,9 @@ This method taps the element by performing the following steps: 1. Use [`property: Page.touchscreen`] to tap the center of the element, or the specified [`option: position`]. 1. Wait for initiated navigations to either succeed or fail, unless [`option: noWaitAfter`] option is set. -If the element is detached from the DOM at any moment during the action, this method rejects. +If the element is detached from the DOM at any moment during the action, this method throws. -When all steps combined have not finished during the specified [`option: timeout`], this method rejects with a +When all steps combined have not finished during the specified [`option: timeout`], this method throws a [TimeoutError]. Passing zero timeout disables this. :::note @@ -765,17 +765,17 @@ Time to wait between key presses in milliseconds. Defaults to 0. ## async method: ElementHandle.uncheck This method checks the element by performing the following steps: -1. Ensure that element is a checkbox or a radio input. If not, this method rejects. If the element is already +1. Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already unchecked, this method returns immediately. 1. Wait for [actionability](./actionability.md) checks on the element, unless [`option: force`] option is set. 1. Scroll the element into view if needed. 1. Use [`property: Page.mouse`] to click in the center of the element. 1. Wait for initiated navigations to either succeed or fail, unless [`option: noWaitAfter`] option is set. -1. Ensure that the element is now unchecked. If not, this method rejects. +1. Ensure that the element is now unchecked. If not, this method throws. -If the element is detached from the DOM at any moment during the action, this method rejects. +If the element is detached from the DOM at any moment during the action, this method throws. -When all steps combined have not finished during the specified [`option: timeout`], this method rejects with a +When all steps combined have not finished during the specified [`option: timeout`], this method throws a [TimeoutError]. Passing zero timeout disables this. ### option: ElementHandle.uncheck.force = %%-input-force-%% diff --git a/docs/src/api/class-frame.md b/docs/src/api/class-frame.md index 8babb86e07..544ff78283 100644 --- a/docs/src/api/class-frame.md +++ b/docs/src/api/class-frame.md @@ -153,18 +153,18 @@ Raw CSS content to be injected into frame. ## async method: Frame.check This method checks an element matching [`param: selector`] by performing the following steps: -1. Find an element match matching [`param: selector`]. If there is none, wait until a matching element is attached to +1. Find an element matching [`param: 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 +1. Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is already checked, this method returns immediately. 1. Wait for [actionability](./actionability.md) checks on the matched element, unless [`option: 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 [`property: Page.mouse`] to click in the center of the element. 1. Wait for initiated navigations to either succeed or fail, unless [`option: noWaitAfter`] option is set. -1. Ensure that the element is now checked. If not, this method rejects. +1. Ensure that the element is now checked. If not, this method throws. -When all steps combined have not finished during the specified [`option: timeout`], this method rejects with a +When all steps combined have not finished during the specified [`option: timeout`], this method throws a [TimeoutError]. Passing zero timeout disables this. ### param: Frame.check.selector = %%-input-selector-%% @@ -181,7 +181,7 @@ When all steps combined have not finished during the specified [`option: timeout ## async method: Frame.click This method clicks an element matching [`param: selector`] by performing the following steps: -1. Find an element match matching [`param: selector`]. If there is none, wait until a matching element is attached to +1. Find an element matching [`param: selector`]. If there is none, wait until a matching element is attached to the DOM. 1. Wait for [actionability](./actionability.md) checks on the matched element, unless [`option: force`] option is set. If the element is detached during the checks, the whole action is retried. @@ -189,7 +189,7 @@ This method clicks an element matching [`param: selector`] by performing the fol 1. Use [`property: Page.mouse`] to click in the center of the element, or the specified [`option: position`]. 1. Wait for initiated navigations to either succeed or fail, unless [`option: noWaitAfter`] option is set. -When all steps combined have not finished during the specified [`option: timeout`], this method rejects with a +When all steps combined have not finished during the specified [`option: timeout`], this method throws a [TimeoutError]. Passing zero timeout disables this. ### param: Frame.click.selector = %%-input-selector-%% @@ -220,16 +220,16 @@ Gets the full HTML contents of the frame, including the doctype. - alias-csharp: DblClickAsync This method double clicks an element matching [`param: selector`] by performing the following steps: -1. Find an element match matching [`param: selector`]. If there is none, wait until a matching element is attached to +1. Find an element matching [`param: selector`]. If there is none, wait until a matching element is attached to the DOM. 1. Wait for [actionability](./actionability.md) checks on the matched element, unless [`option: 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 [`property: Page.mouse`] to double click in the center of the element, or the specified [`option: position`]. 1. Wait for initiated navigations to either succeed or fail, unless [`option: noWaitAfter`] option is set. Note that - if the first click of the `dblclick()` triggers a navigation event, this method will reject. + if the first click of the `dblclick()` triggers a navigation event, this method will throw. -When all steps combined have not finished during the specified [`option: timeout`], this method rejects with a +When all steps combined have not finished during the specified [`option: timeout`], this method throws a [TimeoutError]. Passing zero timeout disables this. :::note @@ -724,7 +724,7 @@ Referer header value. If provided it will take preference over the referer heade ## async method: Frame.hover This method hovers over an element matching [`param: selector`] by performing the following steps: -1. Find an element match matching [`param: selector`]. If there is none, wait until a matching element is attached to +1. Find an element matching [`param: selector`]. If there is none, wait until a matching element is attached to the DOM. 1. Wait for [actionability](./actionability.md) checks on the matched element, unless [`option: force`] option is set. If the element is detached during the checks, the whole action is retried. @@ -732,7 +732,7 @@ This method hovers over an element matching [`param: selector`] by performing th 1. Use [`property: Page.mouse`] to hover over the center of the element, or the specified [`option: 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 [`option: timeout`], this method rejects with a +When all steps combined have not finished during the specified [`option: timeout`], this method throws a [TimeoutError]. Passing zero timeout disables this. ### param: Frame.hover.selector = %%-input-selector-%% @@ -993,7 +993,7 @@ are resolved relative to the the current working directory. For empty array, cle ## async method: Frame.tap This method taps an element matching [`param: selector`] by performing the following steps: -1. Find an element match matching [`param: selector`]. If there is none, wait until a matching element is attached to +1. Find an element matching [`param: selector`]. If there is none, wait until a matching element is attached to the DOM. 1. Wait for [actionability](./actionability.md) checks on the matched element, unless [`option: force`] option is set. If the element is detached during the checks, the whole action is retried. @@ -1001,7 +1001,7 @@ This method taps an element matching [`param: selector`] by performing the follo 1. Use [`property: Page.touchscreen`] to tap the center of the element, or the specified [`option: position`]. 1. Wait for initiated navigations to either succeed or fail, unless [`option: noWaitAfter`] option is set. -When all steps combined have not finished during the specified [`option: timeout`], this method rejects with a +When all steps combined have not finished during the specified [`option: timeout`], this method throws a [TimeoutError]. Passing zero timeout disables this. :::note @@ -1082,18 +1082,18 @@ Time to wait between key presses in milliseconds. Defaults to 0. ## async method: Frame.uncheck This method checks an element matching [`param: selector`] by performing the following steps: -1. Find an element match matching [`param: selector`]. If there is none, wait until a matching element is attached to +1. Find an element matching [`param: 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 +1. Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is already unchecked, this method returns immediately. 1. Wait for [actionability](./actionability.md) checks on the matched element, unless [`option: 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 [`property: Page.mouse`] to click in the center of the element. 1. Wait for initiated navigations to either succeed or fail, unless [`option: noWaitAfter`] option is set. -1. Ensure that the element is now unchecked. If not, this method rejects. +1. Ensure that the element is now unchecked. If not, this method throws. -When all steps combined have not finished during the specified [`option: timeout`], this method rejects with a +When all steps combined have not finished during the specified [`option: timeout`], this method throws a [TimeoutError]. Passing zero timeout disables this. ### param: Frame.uncheck.selector = %%-input-selector-%% diff --git a/docs/src/api/class-page.md b/docs/src/api/class-page.md index 9c7dcba7f3..594afece3a 100644 --- a/docs/src/api/class-page.md +++ b/docs/src/api/class-page.md @@ -509,18 +509,18 @@ Brings page to front (activates tab). ## async method: Page.check This method checks an element matching [`param: selector`] by performing the following steps: -1. Find an element match matching [`param: selector`]. If there is none, wait until a matching element is attached to +1. Find an element matching [`param: 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 +1. Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is already checked, this method returns immediately. 1. Wait for [actionability](./actionability.md) checks on the matched element, unless [`option: 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 [`property: Page.mouse`] to click in the center of the element. 1. Wait for initiated navigations to either succeed or fail, unless [`option: noWaitAfter`] option is set. -1. Ensure that the element is now checked. If not, this method rejects. +1. Ensure that the element is now checked. If not, this method throws. -When all steps combined have not finished during the specified [`option: timeout`], this method rejects with a +When all steps combined have not finished during the specified [`option: timeout`], this method throws a [TimeoutError]. Passing zero timeout disables this. Shortcut for main frame's [`method: Frame.check`]. @@ -536,7 +536,7 @@ Shortcut for main frame's [`method: Frame.check`]. ## async method: Page.click This method clicks an element matching [`param: selector`] by performing the following steps: -1. Find an element match matching [`param: selector`]. If there is none, wait until a matching element is attached to +1. Find an element matching [`param: selector`]. If there is none, wait until a matching element is attached to the DOM. 1. Wait for [actionability](./actionability.md) checks on the matched element, unless [`option: force`] option is set. If the element is detached during the checks, the whole action is retried. @@ -544,7 +544,7 @@ This method clicks an element matching [`param: selector`] by performing the fol 1. Use [`property: Page.mouse`] to click in the center of the element, or the specified [`option: position`]. 1. Wait for initiated navigations to either succeed or fail, unless [`option: noWaitAfter`] option is set. -When all steps combined have not finished during the specified [`option: timeout`], this method rejects with a +When all steps combined have not finished during the specified [`option: timeout`], this method throws a [TimeoutError]. Passing zero timeout disables this. Shortcut for main frame's [`method: Frame.click`]. @@ -610,16 +610,16 @@ Browser-specific Coverage implementation. See [Coverage](#class-coverage) for mo - alias-csharp: DblClickAsync This method double clicks an element matching [`param: selector`] by performing the following steps: -1. Find an element match matching [`param: selector`]. If there is none, wait until a matching element is attached to +1. Find an element matching [`param: selector`]. If there is none, wait until a matching element is attached to the DOM. 1. Wait for [actionability](./actionability.md) checks on the matched element, unless [`option: 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 [`property: Page.mouse`] to double click in the center of the element, or the specified [`option: position`]. 1. Wait for initiated navigations to either succeed or fail, unless [`option: noWaitAfter`] option is set. Note that - if the first click of the `dblclick()` triggers a navigation event, this method will reject. + if the first click of the `dblclick()` triggers a navigation event, this method will throw. -When all steps combined have not finished during the specified [`option: timeout`], this method rejects with a +When all steps combined have not finished during the specified [`option: timeout`], this method throws a [TimeoutError]. Passing zero timeout disables this. :::note @@ -1637,7 +1637,7 @@ Referer header value. If provided it will take preference over the referer heade ## async method: Page.hover This method hovers over an element matching [`param: selector`] by performing the following steps: -1. Find an element match matching [`param: selector`]. If there is none, wait until a matching element is attached to +1. Find an element matching [`param: selector`]. If there is none, wait until a matching element is attached to the DOM. 1. Wait for [actionability](./actionability.md) checks on the matched element, unless [`option: force`] option is set. If the element is detached during the checks, the whole action is retried. @@ -1645,7 +1645,7 @@ This method hovers over an element matching [`param: selector`] by performing th 1. Use [`property: Page.mouse`] to hover over the center of the element, or the specified [`option: 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 [`option: timeout`], this method rejects with a +When all steps combined have not finished during the specified [`option: timeout`], this method throws a [TimeoutError]. Passing zero timeout disables this. Shortcut for main frame's [`method: Frame.hover`]. @@ -2387,7 +2387,7 @@ page.goto("https://example.com") ## async method: Page.tap This method taps an element matching [`param: selector`] by performing the following steps: -1. Find an element match matching [`param: selector`]. If there is none, wait until a matching element is attached to +1. Find an element matching [`param: selector`]. If there is none, wait until a matching element is attached to the DOM. 1. Wait for [actionability](./actionability.md) checks on the matched element, unless [`option: force`] option is set. If the element is detached during the checks, the whole action is retried. @@ -2395,7 +2395,7 @@ This method taps an element matching [`param: selector`] by performing the follo 1. Use [`property: Page.touchscreen`] to tap the center of the element, or the specified [`option: position`]. 1. Wait for initiated navigations to either succeed or fail, unless [`option: noWaitAfter`] option is set. -When all steps combined have not finished during the specified [`option: timeout`], this method rejects with a +When all steps combined have not finished during the specified [`option: timeout`], this method throws a [TimeoutError]. Passing zero timeout disables this. :::note @@ -2483,18 +2483,18 @@ Time to wait between key presses in milliseconds. Defaults to 0. ## async method: Page.uncheck This method unchecks an element matching [`param: selector`] by performing the following steps: -1. Find an element match matching [`param: selector`]. If there is none, wait until a matching element is attached to +1. Find an element matching [`param: 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 +1. Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is already unchecked, this method returns immediately. 1. Wait for [actionability](./actionability.md) checks on the matched element, unless [`option: 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 [`property: Page.mouse`] to click in the center of the element. 1. Wait for initiated navigations to either succeed or fail, unless [`option: noWaitAfter`] option is set. -1. Ensure that the element is now unchecked. If not, this method rejects. +1. Ensure that the element is now unchecked. If not, this method throws. -When all steps combined have not finished during the specified [`option: timeout`], this method rejects with a +When all steps combined have not finished during the specified [`option: timeout`], this method throws a [TimeoutError]. Passing zero timeout disables this. Shortcut for main frame's [`method: Frame.uncheck`]. diff --git a/types/types.d.ts b/types/types.d.ts index 118f46490f..096326f515 100644 --- a/types/types.d.ts +++ b/types/types.d.ts @@ -1344,18 +1344,18 @@ export interface Page { /** * This method checks 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. Ensure that matched element is a checkbox or a radio input. If not, this method rejects. If the element is already + * 1. Find an element 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 throws. If the element is already * checked, this method returns immediately. * 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. 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. + * 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 rejects with a [TimeoutError]. - * Passing zero timeout disables this. + * 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). @@ -1386,7 +1386,7 @@ 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. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM. * 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. @@ -1394,8 +1394,8 @@ export interface Page { * 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. + * 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). @@ -1492,17 +1492,17 @@ export interface Page { /** * 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. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM. * 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 * 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. + * first click of the `dblclick()` triggers a navigation event, this method will throw. * - * When all steps combined have not finished during the specified `timeout`, this method rejects with a [TimeoutError]. - * Passing zero timeout disables this. + * When all steps combined have not finished during the specified `timeout`, this method throws a [TimeoutError]. Passing + * zero timeout disables this. * * > NOTE: `page.dblclick()` dispatches two `click` events and a single `dblclick` event. * @@ -1895,7 +1895,7 @@ export interface Page { /** * This method hovers over 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. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM. * 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. @@ -1903,8 +1903,8 @@ export interface Page { * 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. + * 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.hover(selector[, options])](https://playwright.dev/docs/api/class-frame#framehoverselector-options). @@ -2658,7 +2658,7 @@ export interface Page { /** * This method taps 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. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM. * 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. @@ -2666,8 +2666,8 @@ export interface Page { * 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. + * When all steps combined have not finished during the specified `timeout`, this method throws a [TimeoutError]. Passing + * zero timeout disables this. * * > NOTE: [page.tap(selector[, options])](https://playwright.dev/docs/api/class-page#pagetapselector-options) requires * that the `hasTouch` option of the browser context be set to true. @@ -2781,18 +2781,18 @@ export interface Page { /** * This method unchecks 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. Ensure that matched element is a checkbox or a radio input. If not, this method rejects. If the element is already + * 1. Find an element 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 throws. If the element is already * unchecked, this method returns immediately. * 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. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set. - * 1. Ensure that the element is now unchecked. If not, this method rejects. + * 1. Ensure that the element is now unchecked. If not, this method throws. * - * When all steps combined have not finished during the specified `timeout`, this method rejects with a [TimeoutError]. - * Passing zero timeout disables this. + * 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.uncheck(selector[, options])](https://playwright.dev/docs/api/class-frame#frameuncheckselector-options). @@ -3539,18 +3539,18 @@ export interface Frame { /** * This method checks 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. Ensure that matched element is a checkbox or a radio input. If not, this method rejects. If the element is already + * 1. Find an element 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 throws. If the element is already * checked, this method returns immediately. * 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. 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. + * 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 rejects with a [TimeoutError]. - * Passing zero timeout disables this. + * When all steps combined have not finished during the specified `timeout`, this method throws a [TimeoutError]. Passing + * zero timeout disables this. * @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 */ @@ -3580,7 +3580,7 @@ export interface Frame { /** * 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. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM. * 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. @@ -3588,8 +3588,8 @@ export interface Frame { * 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. + * When all steps combined have not finished during the specified `timeout`, this method throws a [TimeoutError]. Passing + * zero timeout disables this. * @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 */ @@ -3653,17 +3653,17 @@ export interface Frame { /** * 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. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM. * 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 * 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. + * first click of the `dblclick()` triggers a navigation event, this method will throw. * - * When all steps combined have not finished during the specified `timeout`, this method rejects with a [TimeoutError]. - * Passing zero timeout disables this. + * When all steps combined have not finished during the specified `timeout`, this method throws a [TimeoutError]. Passing + * zero timeout disables this. * * > NOTE: `frame.dblclick()` dispatches two `click` events and a single `dblclick` event. * @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. @@ -3891,7 +3891,7 @@ export interface Frame { /** * This method hovers over 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. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM. * 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. @@ -3899,8 +3899,8 @@ export interface Frame { * 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. + * When all steps combined have not finished during the specified `timeout`, this method throws a [TimeoutError]. Passing + * zero timeout disables this. * @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 */ @@ -4278,7 +4278,7 @@ export interface Frame { /** * This method taps 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. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM. * 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. @@ -4286,8 +4286,8 @@ export interface Frame { * 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. + * When all steps combined have not finished during the specified `timeout`, this method throws a [TimeoutError]. Passing + * zero timeout disables this. * * > NOTE: `frame.tap()` requires that the `hasTouch` option of the browser context be set to true. * @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. @@ -4392,18 +4392,18 @@ export interface Frame { /** * This method checks 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. Ensure that matched element is a checkbox or a radio input. If not, this method rejects. If the element is already + * 1. Find an element 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 throws. If the element is already * unchecked, this method returns immediately. * 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. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set. - * 1. Ensure that the element is now unchecked. If not, this method rejects. + * 1. Ensure that the element is now unchecked. If not, this method throws. * - * When all steps combined have not finished during the specified `timeout`, this method rejects with a [TimeoutError]. - * Passing zero timeout disables this. + * When all steps combined have not finished during the specified `timeout`, this method throws a [TimeoutError]. Passing + * zero timeout disables this. * @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 */ @@ -5694,18 +5694,18 @@ export interface ElementHandle extends JSHandle { /** * This method checks the element by performing the following steps: - * 1. Ensure that element is a checkbox or a radio input. If not, this method rejects. If the element is already - * checked, this method returns immediately. + * 1. Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already checked, + * this method returns immediately. * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless `force` option is set. * 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. 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. + * 1. Ensure that the element is now checked. If not, this method throws. * - * If the element is detached from the DOM at any moment during the action, this method rejects. + * If the element is detached from the DOM at any moment during the action, this method throws. * - * When all steps combined have not finished during the specified `timeout`, this method rejects with a [TimeoutError]. - * Passing zero timeout disables this. + * When all steps combined have not finished during the specified `timeout`, this method throws a [TimeoutError]. Passing + * zero timeout disables this. * @param options */ check(options?: { @@ -5738,10 +5738,10 @@ export interface ElementHandle extends JSHandle { * the specified `position`. * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set. * - * If the element is detached from the DOM at any moment during the action, this method rejects. + * If the element is detached from the DOM at any moment during the action, this method throws. * - * When all steps combined have not finished during the specified `timeout`, this method rejects with a [TimeoutError]. - * Passing zero timeout disables this. + * When all steps combined have not finished during the specified `timeout`, this method throws a [TimeoutError]. Passing + * zero timeout disables this. * @param options */ click(options?: { @@ -5809,12 +5809,12 @@ export interface ElementHandle extends JSHandle { * 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. + * first click of the `dblclick()` triggers a navigation event, this method will throw. * - * If the element is detached from the DOM at any moment during the action, this method rejects. + * If the element is detached from the DOM at any moment during the action, this method throws. * - * When all steps combined have not finished during the specified `timeout`, this method rejects with a [TimeoutError]. - * Passing zero timeout disables this. + * When all steps combined have not finished during the specified `timeout`, this method throws a [TimeoutError]. Passing + * zero timeout disables this. * * > NOTE: `elementHandle.dblclick()` dispatches two `click` events and a single `dblclick` event. * @param options @@ -5946,10 +5946,10 @@ export interface ElementHandle extends JSHandle { * the specified `position`. * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set. * - * If the element is detached from the DOM at any moment during the action, this method rejects. + * If the element is detached from the DOM at any moment during the action, this method throws. * - * When all steps combined have not finished during the specified `timeout`, this method rejects with a [TimeoutError]. - * Passing zero timeout disables this. + * When all steps combined have not finished during the specified `timeout`, this method throws a [TimeoutError]. Passing + * zero timeout disables this. * @param options */ hover(options?: { @@ -6281,10 +6281,10 @@ export interface ElementHandle extends JSHandle { * element, or the specified `position`. * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set. * - * If the element is detached from the DOM at any moment during the action, this method rejects. + * If the element is detached from the DOM at any moment during the action, this method throws. * - * When all steps combined have not finished during the specified `timeout`, this method rejects with a [TimeoutError]. - * Passing zero timeout disables this. + * When all steps combined have not finished during the specified `timeout`, this method throws a [TimeoutError]. Passing + * zero timeout disables this. * * > NOTE: `elementHandle.tap()` requires that the `hasTouch` option of the browser context be set to true. * @param options @@ -6378,18 +6378,18 @@ export interface ElementHandle extends JSHandle { /** * This method checks the element by performing the following steps: - * 1. Ensure that element is a checkbox or a radio input. If not, this method rejects. If the element is already + * 1. Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already * unchecked, this method returns immediately. * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless `force` option is set. * 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. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set. - * 1. Ensure that the element is now unchecked. If not, this method rejects. + * 1. Ensure that the element is now unchecked. If not, this method throws. * - * If the element is detached from the DOM at any moment during the action, this method rejects. + * If the element is detached from the DOM at any moment during the action, this method throws. * - * When all steps combined have not finished during the specified `timeout`, this method rejects with a [TimeoutError]. - * Passing zero timeout disables this. + * When all steps combined have not finished during the specified `timeout`, this method throws a [TimeoutError]. Passing + * zero timeout disables this. * @param options */ uncheck(options?: {