Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: deprecate/remove noWaitAfter from some actions (#31739)
Dmitry Gozman6491e5b415a7
diff --git a/docs/src/api/class-elementhandle.md b/docs/src/api/class-elementhandle.mdindex 24b8bb2b6f..1793798c8c 100644--- a/docs/src/api/class-elementhandle.md+++ b/docs/src/api/class-elementhandle.md@@ -164,7 +164,6 @@ This method checks the element by performing the following steps: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 throws.If the element is detached from the DOM at any moment during the action, this method throws.@@ -178,7 +177,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: ElementHandle.check.force = %%-input-force-%%* since: v1.8-### option: ElementHandle.check.noWaitAfter = %%-input-no-wait-after-%%+### option: ElementHandle.check.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: ElementHandle.check.timeout = %%-input-timeout-%%@@ -251,8 +250,6 @@ This method double clicks the element by performing the following steps: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 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 throw.If the element is detached from the DOM at any moment during the action, this method throws.@@ -278,7 +275,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: ElementHandle.dblclick.force = %%-input-force-%%* since: v1.8-### option: ElementHandle.dblclick.noWaitAfter = %%-input-no-wait-after-%%+### option: ElementHandle.dblclick.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: ElementHandle.dblclick.timeout = %%-input-timeout-%%@@ -537,7 +534,7 @@ Value to set for the `<input>`, `<textarea>` or `[contenteditable]` element.### option: ElementHandle.fill.force = %%-input-force-%%* since: v1.13-### option: ElementHandle.fill.noWaitAfter = %%-input-no-wait-after-%%+### option: ElementHandle.fill.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: ElementHandle.fill.timeout = %%-input-timeout-%%@@ -573,7 +570,6 @@ This method hovers over the element by performing the following steps: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 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 throws.@@ -598,7 +594,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: ElementHandle.hover.trial = %%-input-trial-%%* since: v1.11-### option: ElementHandle.hover.noWaitAfter = %%-input-no-wait-after-%%+### option: ElementHandle.hover.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.28## async method: ElementHandle.innerHTML@@ -920,7 +916,6 @@ This method checks or unchecks an element by performing the following steps: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 or unchecked. If not, this method throws.When all steps combined have not finished during the specified [`option: timeout`], this method throws a@@ -932,7 +927,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: ElementHandle.setChecked.force = %%-input-force-%%* since: v1.15-### option: ElementHandle.setChecked.noWaitAfter = %%-input-no-wait-after-%%+### option: ElementHandle.setChecked.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.15### option: ElementHandle.setChecked.position = %%-input-position-%%@@ -961,7 +956,7 @@ This method expects [ElementHandle] to point to an### param: ElementHandle.setInputFiles.files = %%-input-files-%%* since: v1.8-### option: ElementHandle.setInputFiles.noWaitAfter = %%-input-no-wait-after-%%+### option: ElementHandle.setInputFiles.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: ElementHandle.setInputFiles.timeout = %%-input-timeout-%%@@ -978,7 +973,6 @@ This method taps the element by performing the following steps: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.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 throws.@@ -998,7 +992,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: ElementHandle.tap.force = %%-input-force-%%* since: v1.8-### option: ElementHandle.tap.noWaitAfter = %%-input-no-wait-after-%%+### option: ElementHandle.tap.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: ElementHandle.tap.timeout = %%-input-timeout-%%@@ -1039,7 +1033,7 @@ A text to type into a focused element.Time to wait between key presses in milliseconds. Defaults to 0.-### option: ElementHandle.type.noWaitAfter = %%-input-no-wait-after-%%+### option: ElementHandle.type.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: ElementHandle.type.timeout = %%-input-timeout-%%@@ -1058,7 +1052,6 @@ This method checks the element by performing the following steps: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 throws.If the element is detached from the DOM at any moment during the action, this method throws.@@ -1072,7 +1065,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: ElementHandle.uncheck.force = %%-input-force-%%* since: v1.8-### option: ElementHandle.uncheck.noWaitAfter = %%-input-no-wait-after-%%+### option: ElementHandle.uncheck.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: ElementHandle.uncheck.timeout = %%-input-timeout-%%diff --git a/docs/src/api/class-filechooser.md b/docs/src/api/class-filechooser.mdindex 0edb5b9cf4..82502c8d5e 100644--- a/docs/src/api/class-filechooser.md+++ b/docs/src/api/class-filechooser.md@@ -65,7 +65,7 @@ they are resolved relative to the current working directory. For empty array, cl### param: FileChooser.setFiles.files = %%-input-files-%%* since: v1.8-### option: FileChooser.setFiles.noWaitAfter = %%-input-no-wait-after-%%+### option: FileChooser.setFiles.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: FileChooser.setFiles.timeout = %%-input-timeout-%%diff --git a/docs/src/api/class-frame.md b/docs/src/api/class-frame.mdindex 50e157b15c..65ef1b714d 100644--- a/docs/src/api/class-frame.md+++ b/docs/src/api/class-frame.md@@ -198,7 +198,6 @@ This method checks an element matching [`param: selector`] by performing the folset. 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 throws.When all steps combined have not finished during the specified [`option: timeout`], this method throws a@@ -210,7 +209,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: Frame.check.force = %%-input-force-%%* since: v1.8-### option: Frame.check.noWaitAfter = %%-input-no-wait-after-%%+### option: Frame.check.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: Frame.check.position = %%-input-position-%%@@ -303,7 +302,6 @@ This method double clicks an element matching [`param: selector`] by performingset. 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 thatif 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 throws a@@ -328,7 +326,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: Frame.dblclick.modifiers = %%-input-modifiers-%%* since: v1.8-### option: Frame.dblclick.noWaitAfter = %%-input-no-wait-after-%%+### option: Frame.dblclick.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: Frame.dblclick.position = %%-input-position-%%@@ -463,7 +461,7 @@ Optional event-specific initialization properties.### option: Frame.dragAndDrop.force = %%-input-force-%%* since: v1.13-### option: Frame.dragAndDrop.noWaitAfter = %%-input-no-wait-after-%%+### option: Frame.dragAndDrop.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.13### option: Frame.dragAndDrop.strict = %%-input-strict-%%@@ -856,7 +854,7 @@ Value to fill for the `<input>`, `<textarea>` or `[contenteditable]` element.### option: Frame.fill.force = %%-input-force-%%* since: v1.13-### option: Frame.fill.noWaitAfter = %%-input-no-wait-after-%%+### option: Frame.fill.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: Frame.fill.strict = %%-input-strict-%%@@ -1130,7 +1128,6 @@ This method hovers over an element matching [`param: selector`] by performing thset. 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 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 throws a[TimeoutError]. Passing zero timeout disables this.@@ -1159,7 +1156,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: Frame.hover.trial = %%-input-trial-%%* since: v1.11-### option: Frame.hover.noWaitAfter = %%-input-no-wait-after-%%+### option: Frame.hover.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.28## async method: Frame.innerHTML@@ -1583,7 +1580,6 @@ This method checks or unchecks an element matching [`param: selector`] by perforset. 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 or unchecked. If not, this method throws.When all steps combined have not finished during the specified [`option: timeout`], this method throws a@@ -1598,7 +1594,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: Frame.setChecked.force = %%-input-force-%%* since: v1.15-### option: Frame.setChecked.noWaitAfter = %%-input-no-wait-after-%%+### option: Frame.setChecked.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.15### option: Frame.setChecked.position = %%-input-position-%%@@ -1652,7 +1648,7 @@ This method expects [`param: selector`] to point to an### param: Frame.setInputFiles.files = %%-input-files-%%* since: v1.8-### option: Frame.setInputFiles.noWaitAfter = %%-input-no-wait-after-%%+### option: Frame.setInputFiles.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: Frame.setInputFiles.strict = %%-input-strict-%%@@ -1675,7 +1671,6 @@ This method taps an element matching [`param: selector`] by performing the folloset. 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.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 throws a[TimeoutError]. Passing zero timeout disables this.@@ -1693,7 +1688,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: Frame.tap.modifiers = %%-input-modifiers-%%* since: v1.8-### option: Frame.tap.noWaitAfter = %%-input-no-wait-after-%%+### option: Frame.tap.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: Frame.tap.position = %%-input-position-%%@@ -1762,7 +1757,7 @@ A text to type into a focused element.Time to wait between key presses in milliseconds. Defaults to 0.-### option: Frame.type.noWaitAfter = %%-input-no-wait-after-%%+### option: Frame.type.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: Frame.type.strict = %%-input-strict-%%@@ -1787,7 +1782,6 @@ This method checks an element matching [`param: selector`] by performing the folset. 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 throws.When all steps combined have not finished during the specified [`option: timeout`], this method throws a@@ -1799,7 +1793,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: Frame.uncheck.force = %%-input-force-%%* since: v1.8-### option: Frame.uncheck.noWaitAfter = %%-input-no-wait-after-%%+### option: Frame.uncheck.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: Frame.uncheck.position = %%-input-position-%%diff --git a/docs/src/api/class-locator.md b/docs/src/api/class-locator.mdindex e3082abdd4..8a148ddf0b 100644--- a/docs/src/api/class-locator.md+++ b/docs/src/api/class-locator.md@@ -231,7 +231,6 @@ Performs the following steps: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 throws.If the element is detached from the DOM at any moment during the action, this method throws.@@ -267,7 +266,7 @@ await page.GetByRole(AriaRole.Checkbox).CheckAsync();### option: Locator.check.force = %%-input-force-%%* since: v1.14-### option: Locator.check.noWaitAfter = %%-input-no-wait-after-%%+### option: Locator.check.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.14### option: Locator.check.timeout = %%-input-timeout-%%@@ -317,7 +316,7 @@ await page.GetByRole(AriaRole.Textbox).ClearAsync();### option: Locator.clear.force = %%-input-force-%%* since: v1.28-### option: Locator.clear.noWaitAfter = %%-input-no-wait-after-%%+### option: Locator.clear.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.28### option: Locator.clear.timeout = %%-input-timeout-%%@@ -483,8 +482,6 @@ This method double clicks the element by performing the following steps: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 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 throw.If the element is detached from the DOM at any moment during the action, this method throws.@@ -510,7 +507,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: Locator.dblclick.force = %%-input-force-%%* since: v1.14-### option: Locator.dblclick.noWaitAfter = %%-input-no-wait-after-%%+### option: Locator.dblclick.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.14### option: Locator.dblclick.timeout = %%-input-timeout-%%@@ -709,7 +706,7 @@ Locator of the element to drag to.### option: Locator.dragTo.force = %%-input-force-%%* since: v1.18-### option: Locator.dragTo.noWaitAfter = %%-input-no-wait-after-%%+### option: Locator.dragTo.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.18### option: Locator.dragTo.timeout = %%-input-timeout-%%@@ -986,7 +983,7 @@ Value to set for the `<input>`, `<textarea>` or `[contenteditable]` element.### option: Locator.fill.force = %%-input-force-%%* since: v1.14-### option: Locator.fill.noWaitAfter = %%-input-no-wait-after-%%+### option: Locator.fill.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.14### option: Locator.fill.timeout = %%-input-timeout-%%@@ -1248,7 +1245,6 @@ This method hovers over the element by performing the following steps: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 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 throws.@@ -1273,7 +1269,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: Locator.hover.trial = %%-input-trial-%%* since: v1.14-### option: Locator.hover.noWaitAfter = %%-input-no-wait-after-%%+### option: Locator.hover.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.28## async method: Locator.innerHTML@@ -1876,7 +1872,7 @@ String of characters to sequentially press into a focused element.Time to wait between key presses in milliseconds. Defaults to 0.-### option: Locator.pressSequentially.noWaitAfter = %%-input-no-wait-after-%%+### option: Locator.pressSequentially.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.38### option: Locator.pressSequentially.timeout = %%-input-timeout-%%@@ -2133,7 +2129,6 @@ This method checks or unchecks an element by performing the following steps: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 or unchecked. If not, this method throws.When all steps combined have not finished during the specified [`option: timeout`], this method throws a@@ -2145,7 +2140,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: Locator.setChecked.force = %%-input-force-%%* since: v1.15-### option: Locator.setChecked.noWaitAfter = %%-input-no-wait-after-%%+### option: Locator.setChecked.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.15### option: Locator.setChecked.position = %%-input-position-%%@@ -2286,7 +2281,7 @@ This method expects [Locator] to point to an### param: Locator.setInputFiles.files = %%-input-files-%%* since: v1.14-### option: Locator.setInputFiles.noWaitAfter = %%-input-no-wait-after-%%+### option: Locator.setInputFiles.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.14### option: Locator.setInputFiles.timeout = %%-input-timeout-%%@@ -2306,7 +2301,6 @@ This method taps the element by performing the following steps: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.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 throws.@@ -2326,7 +2320,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: Locator.tap.force = %%-input-force-%%* since: v1.14-### option: Locator.tap.noWaitAfter = %%-input-no-wait-after-%%+### option: Locator.tap.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.14### option: Locator.tap.timeout = %%-input-timeout-%%@@ -2376,7 +2370,7 @@ A text to type into a focused element.Time to wait between key presses in milliseconds. Defaults to 0.-### option: Locator.type.noWaitAfter = %%-input-no-wait-after-%%+### option: Locator.type.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.14### option: Locator.type.timeout = %%-input-timeout-%%@@ -2420,7 +2414,6 @@ This method unchecks the element by performing the following steps: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 throws.If the element is detached from the DOM at any moment during the action, this method throws.@@ -2434,7 +2427,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: Locator.uncheck.force = %%-input-force-%%* since: v1.14-### option: Locator.uncheck.noWaitAfter = %%-input-no-wait-after-%%+### option: Locator.uncheck.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.14### option: Locator.uncheck.timeout = %%-input-timeout-%%diff --git a/docs/src/api/class-page.md b/docs/src/api/class-page.mdindex 3d667bb186..d419ba0b7b 100644--- a/docs/src/api/class-page.md+++ b/docs/src/api/class-page.md@@ -735,7 +735,6 @@ This method checks an element matching [`param: selector`] by performing the folset. 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 throws.When all steps combined have not finished during the specified [`option: timeout`], this method throws a@@ -747,7 +746,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: Page.check.force = %%-input-force-%%* since: v1.8-### option: Page.check.noWaitAfter = %%-input-no-wait-after-%%+### option: Page.check.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: Page.check.position = %%-input-position-%%@@ -879,8 +878,6 @@ This method double clicks an element matching [`param: selector`] by performingset. 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 throw.When all steps combined have not finished during the specified [`option: timeout`], this method throws a[TimeoutError]. Passing zero timeout disables this.@@ -904,7 +901,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: Page.dblclick.modifiers = %%-input-modifiers-%%* since: v1.8-### option: Page.dblclick.noWaitAfter = %%-input-no-wait-after-%%+### option: Page.dblclick.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: Page.dblclick.position = %%-input-position-%%@@ -1092,7 +1089,7 @@ await Page.DragAndDropAsync("#source", "#target", new()### option: Page.dragAndDrop.force = %%-input-force-%%* since: v1.13-### option: Page.dragAndDrop.noWaitAfter = %%-input-no-wait-after-%%+### option: Page.dragAndDrop.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.13### option: Page.dragAndDrop.strict = %%-input-strict-%%@@ -2050,7 +2047,7 @@ Value to fill for the `<input>`, `<textarea>` or `[contenteditable]` element.### option: Page.fill.force = %%-input-force-%%* since: v1.13-### option: Page.fill.noWaitAfter = %%-input-no-wait-after-%%+### option: Page.fill.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: Page.fill.strict = %%-input-strict-%%@@ -2411,7 +2408,6 @@ This method hovers over an element matching [`param: selector`] by performing thset. 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 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 throws a[TimeoutError]. Passing zero timeout disables this.@@ -2440,7 +2436,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: Page.hover.trial = %%-input-trial-%%* since: v1.11-### option: Page.hover.noWaitAfter = %%-input-no-wait-after-%%+### option: Page.hover.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.28## async method: Page.innerHTML@@ -3742,7 +3738,6 @@ This method checks or unchecks an element matching [`param: selector`] by perforset. 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 or unchecked. If not, this method throws.When all steps combined have not finished during the specified [`option: timeout`], this method throws a@@ -3757,7 +3752,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: Page.setChecked.force = %%-input-force-%%* since: v1.15-### option: Page.setChecked.noWaitAfter = %%-input-no-wait-after-%%+### option: Page.setChecked.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.15### option: Page.setChecked.position = %%-input-position-%%@@ -3865,7 +3860,7 @@ This method expects [`param: selector`] to point to an### param: Page.setInputFiles.files = %%-input-files-%%* since: v1.8-### option: Page.setInputFiles.noWaitAfter = %%-input-no-wait-after-%%+### option: Page.setInputFiles.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: Page.setInputFiles.strict = %%-input-strict-%%@@ -3949,7 +3944,6 @@ This method taps an element matching [`param: selector`] by performing the folloset. 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.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 throws a[TimeoutError]. Passing zero timeout disables this.@@ -3967,7 +3961,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: Page.tap.modifiers = %%-input-modifiers-%%* since: v1.8-### option: Page.tap.noWaitAfter = %%-input-no-wait-after-%%+### option: Page.tap.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: Page.tap.position = %%-input-position-%%@@ -4040,7 +4034,7 @@ A text to type into a focused element.Time to wait between key presses in milliseconds. Defaults to 0.-### option: Page.type.noWaitAfter = %%-input-no-wait-after-%%+### option: Page.type.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: Page.type.strict = %%-input-strict-%%@@ -4065,7 +4059,6 @@ This method unchecks an element matching [`param: selector`] by performing the fset. 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 throws.When all steps combined have not finished during the specified [`option: timeout`], this method throws a@@ -4077,7 +4070,7 @@ When all steps combined have not finished during the specified [`option: timeout### option: Page.uncheck.force = %%-input-force-%%* since: v1.8-### option: Page.uncheck.noWaitAfter = %%-input-no-wait-after-%%+### option: Page.uncheck.noWaitAfter = %%-input-no-wait-after-removed-%%* since: v1.8### option: Page.uncheck.position = %%-input-position-%%diff --git a/docs/src/api/params.md b/docs/src/api/params.mdindex 4e2d554ed1..d5d7edf89c 100644--- a/docs/src/api/params.md+++ b/docs/src/api/params.md@@ -62,12 +62,19 @@ Maximum time in milliseconds. Defaults to `0` - no timeout. The default value ca[`method: Page.setDefaultTimeout`] methods.## input-no-wait-after+* deprecated: This option will default to `true` in the future.- `noWaitAfter` <[boolean]>Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You canopt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigatingto inaccessible pages. Defaults to `false`.+## input-no-wait-after-removed+* deprecated: This option has no effect.+- `noWaitAfter` <[boolean]>++This option has no effect.+## input-force- `force` <[boolean]>diff --git a/packages/playwright-core/src/protocol/validator.ts b/packages/playwright-core/src/protocol/validator.tsindex c873c0d289..8814727389 100644--- a/packages/playwright-core/src/protocol/validator.ts+++ b/packages/playwright-core/src/protocol/validator.ts@@ -1424,7 +1424,6 @@ scheme.FrameCheckParams = tObject({selector: tString,strict: tOptional(tBoolean),force: tOptional(tBoolean),- noWaitAfter: tOptional(tBoolean),position: tOptional(tType('Point')),timeout: tOptional(tNumber),trial: tOptional(tBoolean),@@ -1452,7 +1451,6 @@ scheme.FrameDragAndDropParams = tObject({source: tString,target: tString,force: tOptional(tBoolean),- noWaitAfter: tOptional(tBoolean),timeout: tOptional(tNumber),trial: tOptional(tBoolean),sourcePosition: tOptional(tType('Point')),@@ -1464,7 +1462,6 @@ scheme.FrameDblclickParams = tObject({selector: tString,strict: tOptional(tBoolean),force: tOptional(tBoolean),- noWaitAfter: tOptional(tBoolean),modifiers: tOptional(tArray(tEnum(['Alt', 'Control', 'ControlOrMeta', 'Meta', 'Shift']))),position: tOptional(tType('Point')),delay: tOptional(tNumber),@@ -1503,7 +1500,6 @@ scheme.FrameFillParams = tObject({value: tString,force: tOptional(tBoolean),timeout: tOptional(tNumber),- noWaitAfter: tOptional(tBoolean),});scheme.FrameFillResult = tOptional(tObject({}));scheme.FrameFocusParams = tObject({@@ -1546,7 +1542,6 @@ scheme.FrameHoverParams = tObject({position: tOptional(tType('Point')),timeout: tOptional(tNumber),trial: tOptional(tBoolean),- noWaitAfter: tOptional(tBoolean),});scheme.FrameHoverResult = tOptional(tObject({}));scheme.FrameInnerHTMLParams = tObject({@@ -1683,14 +1678,12 @@ scheme.FrameSetInputFilesParams = tObject({localPaths: tOptional(tArray(tString)),streams: tOptional(tArray(tChannel(['WritableStream']))),timeout: tOptional(tNumber),- noWaitAfter: tOptional(tBoolean),});scheme.FrameSetInputFilesResult = tOptional(tObject({}));scheme.FrameTapParams = tObject({selector: tString,strict: tOptional(tBoolean),force: tOptional(tBoolean),- noWaitAfter: tOptional(tBoolean),modifiers: tOptional(tArray(tEnum(['Alt', 'Control', 'ControlOrMeta', 'Meta', 'Shift']))),position: tOptional(tType('Point')),timeout: tOptional(tNumber),@@ -1714,7 +1707,6 @@ scheme.FrameTypeParams = tObject({strict: tOptional(tBoolean),text: tString,delay: tOptional(tNumber),- noWaitAfter: tOptional(tBoolean),timeout: tOptional(tNumber),});scheme.FrameTypeResult = tOptional(tObject({}));@@ -1722,7 +1714,6 @@ scheme.FrameUncheckParams = tObject({selector: tString,strict: tOptional(tBoolean),force: tOptional(tBoolean),- noWaitAfter: tOptional(tBoolean),position: tOptional(tType('Point')),timeout: tOptional(tNumber),trial: tOptional(tBoolean),@@ -1877,7 +1868,6 @@ scheme.ElementHandleBoundingBoxResult = tObject({});scheme.ElementHandleCheckParams = tObject({force: tOptional(tBoolean),- noWaitAfter: tOptional(tBoolean),position: tOptional(tType('Point')),timeout: tOptional(tNumber),trial: tOptional(tBoolean),@@ -1901,7 +1891,6 @@ scheme.ElementHandleContentFrameResult = tObject({});scheme.ElementHandleDblclickParams = tObject({force: tOptional(tBoolean),- noWaitAfter: tOptional(tBoolean),modifiers: tOptional(tArray(tEnum(['Alt', 'Control', 'ControlOrMeta', 'Meta', 'Shift']))),position: tOptional(tType('Point')),delay: tOptional(tNumber),@@ -1919,7 +1908,6 @@ scheme.ElementHandleFillParams = tObject({value: tString,force: tOptional(tBoolean),timeout: tOptional(tNumber),- noWaitAfter: tOptional(tBoolean),});scheme.ElementHandleFillResult = tOptional(tObject({}));scheme.ElementHandleFocusParams = tOptional(tObject({}));@@ -1936,7 +1924,6 @@ scheme.ElementHandleHoverParams = tObject({position: tOptional(tType('Point')),timeout: tOptional(tNumber),trial: tOptional(tBoolean),- noWaitAfter: tOptional(tBoolean),});scheme.ElementHandleHoverResult = tOptional(tObject({}));scheme.ElementHandleInnerHTMLParams = tOptional(tObject({}));@@ -2052,12 +2039,10 @@ scheme.ElementHandleSetInputFilesParams = tObject({localPaths: tOptional(tArray(tString)),streams: tOptional(tArray(tChannel(['WritableStream']))),timeout: tOptional(tNumber),- noWaitAfter: tOptional(tBoolean),});scheme.ElementHandleSetInputFilesResult = tOptional(tObject({}));scheme.ElementHandleTapParams = tObject({force: tOptional(tBoolean),- noWaitAfter: tOptional(tBoolean),modifiers: tOptional(tArray(tEnum(['Alt', 'Control', 'ControlOrMeta', 'Meta', 'Shift']))),position: tOptional(tType('Point')),timeout: tOptional(tNumber),@@ -2071,13 +2056,11 @@ scheme.ElementHandleTextContentResult = tObject({scheme.ElementHandleTypeParams = tObject({text: tString,delay: tOptional(tNumber),- noWaitAfter: tOptional(tBoolean),timeout: tOptional(tNumber),});scheme.ElementHandleTypeResult = tOptional(tObject({}));scheme.ElementHandleUncheckParams = tObject({force: tOptional(tBoolean),- noWaitAfter: tOptional(tBoolean),position: tOptional(tType('Point')),timeout: tOptional(tNumber),trial: tOptional(tBoolean),diff --git a/packages/playwright-core/src/server/dom.ts b/packages/playwright-core/src/server/dom.tsindex 52e648abe0..60aa899412 100644--- a/packages/playwright-core/src/server/dom.ts+++ b/packages/playwright-core/src/server/dom.ts@@ -342,7 +342,7 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {}async _retryPointerAction(progress: Progress, actionName: ActionName, waitForEnabled: boolean, action: (point: types.Point) => Promise<void>,- options: types.PointerActionOptions & types.PointerActionWaitOptions & types.NavigatingActionWaitOptions): Promise<'error:notconnected' | 'done'> {+ options: { waitAfter: boolean | 'disabled' } & types.PointerActionOptions & types.PointerActionWaitOptions): Promise<'error:notconnected' | 'done'> {// Note: do not perform locator handlers checkpoint to avoid moving the mouse in the middle of a drag operation.const skipLocatorHandlersCheckpoint = actionName === 'move and up';return await this._retryAction(progress, actionName, async retry => {@@ -361,7 +361,14 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {}, { ...options, skipLocatorHandlersCheckpoint });}- async _performPointerAction(progress: Progress, actionName: ActionName, waitForEnabled: boolean, action: (point: types.Point) => Promise<void>, forceScrollOptions: ScrollIntoViewOptions | undefined, options: types.PointerActionOptions & types.PointerActionWaitOptions & types.NavigatingActionWaitOptions): Promise<PerformActionResult> {+ async _performPointerAction(+ progress: Progress,+ actionName: ActionName,+ waitForEnabled: boolean,+ action: (point: types.Point) => Promise<void>,+ forceScrollOptions: ScrollIntoViewOptions | undefined,+ options: { waitAfter: boolean | 'disabled' } & types.PointerActionOptions & types.PointerActionWaitOptions,+ ): Promise<PerformActionResult> {const { force = false, position } = options;const doScrollIntoView = async () => {@@ -444,7 +451,7 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {});}- const actionResult = await this._page._frameManager.waitForSignalsCreatedBy(progress, options.noWaitAfter, async () => {+ const actionResult = await this._page._frameManager.waitForSignalsCreatedBy(progress, options.waitAfter === true, async () => {if ((options as any).__testHookBeforePointerAction)await (options as any).__testHookBeforePointerAction();progress.throwIfAborted(); // Avoid action that has side-effects.@@ -456,10 +463,12 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {if (restoreModifiers)await this._page.keyboard.ensureModifiers(restoreModifiers);if (hitTargetInterceptionHandle) {- const stopHitTargetInterception = hitTargetInterceptionHandle.evaluate(h => h.stop()).catch(e => 'done' as const).finally(() => {+ const stopHitTargetInterception = this._frame.raceAgainstEvaluationStallingEvents(() => {+ return hitTargetInterceptionHandle.evaluate(h => h.stop());+ }).catch(e => 'done' as const).finally(() => {hitTargetInterceptionHandle?.dispose();});- if (!options.noWaitAfter) {+ if (options.waitAfter !== false) {// When noWaitAfter is passed, we do not want to accidentally stall on// non-committed navigation blocking the evaluate.const hitTargetResult = await stopHitTargetInterception;@@ -472,7 +481,7 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {if ((options as any).__testHookAfterPointerAction)await (options as any).__testHookAfterPointerAction();return 'done';- }, 'input');+ });if (actionResult !== 'done')return actionResult;progress.log(' navigations have finished');@@ -487,23 +496,23 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {}, this._page._timeoutSettings.timeout(options));}- _hover(progress: Progress, options: types.PointerActionOptions & types.PointerActionWaitOptions & types.NavigatingActionWaitOptions): Promise<'error:notconnected' | 'done'> {- return this._retryPointerAction(progress, 'hover', false /* waitForEnabled */, point => this._page.mouse.move(point.x, point.y), options);+ _hover(progress: Progress, options: types.PointerActionOptions & types.PointerActionWaitOptions): Promise<'error:notconnected' | 'done'> {+ return this._retryPointerAction(progress, 'hover', false /* waitForEnabled */, point => this._page.mouse.move(point.x, point.y), { ...options, waitAfter: 'disabled' });}- async click(metadata: CallMetadata, options: types.MouseClickOptions & types.PointerActionWaitOptions & types.NavigatingActionWaitOptions = {}): Promise<void> {+ async click(metadata: CallMetadata, options: { noWaitAfter?: boolean } & types.MouseClickOptions & types.PointerActionWaitOptions = {}): Promise<void> {const controller = new ProgressController(metadata, this);return controller.run(async progress => {- const result = await this._click(progress, options);+ const result = await this._click(progress, { ...options, waitAfter: !options.noWaitAfter });return assertDone(throwRetargetableDOMError(result));}, this._page._timeoutSettings.timeout(options));}- _click(progress: Progress, options: types.MouseClickOptions & types.PointerActionWaitOptions & types.NavigatingActionWaitOptions): Promise<'error:notconnected' | 'done'> {+ _click(progress: Progress, options: { waitAfter: boolean | 'disabled' } & types.MouseClickOptions & types.PointerActionWaitOptions): Promise<'error:notconnected' | 'done'> {return this._retryPointerAction(progress, 'click', true /* waitForEnabled */, point => this._page.mouse.click(point.x, point.y, options), options);}- async dblclick(metadata: CallMetadata, options: types.MouseMultiClickOptions & types.PointerActionWaitOptions & types.NavigatingActionWaitOptions): Promise<void> {+ async dblclick(metadata: CallMetadata, options: types.MouseMultiClickOptions & types.PointerActionWaitOptions): Promise<void> {const controller = new ProgressController(metadata, this);return controller.run(async progress => {const result = await this._dblclick(progress, options);@@ -511,11 +520,11 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {}, this._page._timeoutSettings.timeout(options));}- _dblclick(progress: Progress, options: types.MouseMultiClickOptions & types.PointerActionWaitOptions & types.NavigatingActionWaitOptions): Promise<'error:notconnected' | 'done'> {- return this._retryPointerAction(progress, 'dblclick', true /* waitForEnabled */, point => this._page.mouse.dblclick(point.x, point.y, options), options);+ _dblclick(progress: Progress, options: types.MouseMultiClickOptions & types.PointerActionWaitOptions): Promise<'error:notconnected' | 'done'> {+ return this._retryPointerAction(progress, 'dblclick', true /* waitForEnabled */, point => this._page.mouse.dblclick(point.x, point.y, options), { ...options, waitAfter: 'disabled' });}- async tap(metadata: CallMetadata, options: types.PointerActionWaitOptions & types.NavigatingActionWaitOptions = {}): Promise<void> {+ async tap(metadata: CallMetadata, options: types.PointerActionWaitOptions = {}): Promise<void> {const controller = new ProgressController(metadata, this);return controller.run(async progress => {const result = await this._tap(progress, options);@@ -523,11 +532,11 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {}, this._page._timeoutSettings.timeout(options));}- _tap(progress: Progress, options: types.PointerActionWaitOptions & types.NavigatingActionWaitOptions): Promise<'error:notconnected' | 'done'> {- return this._retryPointerAction(progress, 'tap', true /* waitForEnabled */, point => this._page.touchscreen.tap(point.x, point.y), options);+ _tap(progress: Progress, options: types.PointerActionWaitOptions): Promise<'error:notconnected' | 'done'> {+ return this._retryPointerAction(progress, 'tap', true /* waitForEnabled */, point => this._page.touchscreen.tap(point.x, point.y), { ...options, waitAfter: 'disabled' });}- async selectOption(metadata: CallMetadata, elements: ElementHandle[], values: types.SelectOption[], options: types.NavigatingActionWaitOptions & types.ForceOptions): Promise<string[]> {+ async selectOption(metadata: CallMetadata, elements: ElementHandle[], values: types.SelectOption[], options: { noWaitAfter?: boolean } & types.CommonActionOptions): Promise<string[]> {const controller = new ProgressController(metadata, this);return controller.run(async progress => {const result = await this._selectOption(progress, elements, values, options);@@ -535,7 +544,7 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {}, this._page._timeoutSettings.timeout(options));}- async _selectOption(progress: Progress, elements: ElementHandle[], values: types.SelectOption[], options: types.NavigatingActionWaitOptions & types.ForceOptions): Promise<string[] | 'error:notconnected'> {+ async _selectOption(progress: Progress, elements: ElementHandle[], values: types.SelectOption[], options: { noWaitAfter?: boolean } & types.CommonActionOptions): Promise<string[] | 'error:notconnected'> {let resultingOptions: string[] = [];await this._retryAction(progress, 'select option', async () => {await progress.beforeInputAction(this);@@ -560,7 +569,7 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {return resultingOptions;}- async fill(metadata: CallMetadata, value: string, options: types.NavigatingActionWaitOptions & types.ForceOptions = {}): Promise<void> {+ async fill(metadata: CallMetadata, value: string, options: types.CommonActionOptions = {}): Promise<void> {const controller = new ProgressController(metadata, this);return controller.run(async progress => {const result = await this._fill(progress, value, options);@@ -568,36 +577,34 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {}, this._page._timeoutSettings.timeout(options));}- async _fill(progress: Progress, value: string, options: types.NavigatingActionWaitOptions & types.ForceOptions): Promise<'error:notconnected' | 'done'> {+ async _fill(progress: Progress, value: string, options: types.CommonActionOptions): Promise<'error:notconnected' | 'done'> {progress.log(` fill("${value}")`);return await this._retryAction(progress, 'fill', async () => {await progress.beforeInputAction(this);- return this._page._frameManager.waitForSignalsCreatedBy(progress, options.noWaitAfter, async () => {- if (!options.force)- progress.log(' waiting for element to be visible, enabled and editable');- const result = await this.evaluateInUtility(async ([injected, node, { value, force }]) => {- if (!force) {- const checkResult = await injected.checkElementStates(node, ['visible', 'enabled', 'editable']);- if (checkResult)- return checkResult;- }- return injected.fill(node, value);- }, { value, force: options.force });- progress.throwIfAborted(); // Avoid action that has side-effects.- if (result === 'needsinput') {- if (value)- await this._page.keyboard.insertText(value);- else- await this._page.keyboard.press('Delete');- return 'done';- } else {- return result;+ if (!options.force)+ progress.log(' waiting for element to be visible, enabled and editable');+ const result = await this.evaluateInUtility(async ([injected, node, { value, force }]) => {+ if (!force) {+ const checkResult = await injected.checkElementStates(node, ['visible', 'enabled', 'editable']);+ if (checkResult)+ return checkResult;}- }, 'input');+ return injected.fill(node, value);+ }, { value, force: options.force });+ progress.throwIfAborted(); // Avoid action that has side-effects.+ if (result === 'needsinput') {+ if (value)+ await this._page.keyboard.insertText(value);+ else+ await this._page.keyboard.press('Delete');+ return 'done';+ } else {+ return result;+ }}, options);}- async selectText(metadata: CallMetadata, options: types.TimeoutOptions & types.ForceOptions = {}): Promise<void> {+ async selectText(metadata: CallMetadata, options: types.CommonActionOptions = {}): Promise<void> {const controller = new ProgressController(metadata, this);return controller.run(async progress => {const result = await this._retryAction(progress, 'selectText', async () => {@@ -620,12 +627,12 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {const inputFileItems = await prepareFilesForUpload(this._frame, params);const controller = new ProgressController(metadata, this);return controller.run(async progress => {- const result = await this._setInputFiles(progress, inputFileItems, params);+ const result = await this._setInputFiles(progress, inputFileItems);return assertDone(throwRetargetableDOMError(result));}, this._page._timeoutSettings.timeout(params));}- async _setInputFiles(progress: Progress, items: InputFilesItems, options: types.NavigatingActionWaitOptions): Promise<'error:notconnected' | 'done'> {+ async _setInputFiles(progress: Progress, items: InputFilesItems): Promise<'error:notconnected' | 'done'> {const { filePayloads, localPaths, localDirectory } = items;const multiple = filePayloads && filePayloads.length > 1 || localPaths && localPaths.length > 1;const result = await this.evaluateHandleInUtility(([injected, node, { multiple, directoryUpload }]): Element | undefined => {@@ -647,23 +654,21 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {return 'error:notconnected';const retargeted = result.asElement() as ElementHandle<HTMLInputElement>;await progress.beforeInputAction(this);- await this._page._frameManager.waitForSignalsCreatedBy(progress, options.noWaitAfter, async () => {- progress.throwIfAborted(); // Avoid action that has side-effects.- if (localPaths || localDirectory) {- const localPathsOrDirectory = localDirectory ? [localDirectory] : localPaths!;- await Promise.all((localPathsOrDirectory).map(localPath => (- fs.promises.access(localPath, fs.constants.F_OK)- )));- // Browsers traverse the given directory asynchronously and we want to ensure all files are uploaded.- const waitForInputEvent = localDirectory ? this.evaluate(node => new Promise<any>(fulfill => {- node.addEventListener('input', fulfill, { once: true });- })).catch(() => {}) : Promise.resolve();- await this._page._delegate.setInputFilePaths(retargeted, localPathsOrDirectory);- await waitForInputEvent;- } else {- await this._page._delegate.setInputFiles(retargeted, filePayloads!);- }- });+ progress.throwIfAborted(); // Avoid action that has side-effects.+ if (localPaths || localDirectory) {+ const localPathsOrDirectory = localDirectory ? [localDirectory] : localPaths!;+ await Promise.all((localPathsOrDirectory).map(localPath => (+ fs.promises.access(localPath, fs.constants.F_OK)+ )));+ // Browsers traverse the given directory asynchronously and we want to ensure all files are uploaded.+ const waitForInputEvent = localDirectory ? this.evaluate(node => new Promise<any>(fulfill => {+ node.addEventListener('input', fulfill, { once: true });+ })).catch(() => {}) : Promise.resolve();+ await this._page._delegate.setInputFilePaths(retargeted, localPathsOrDirectory);+ await waitForInputEvent;+ } else {+ await this._page._delegate.setInputFiles(retargeted, filePayloads!);+ }return 'done';}@@ -685,7 +690,7 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {return await this.evaluateInUtility(([injected, node]) => injected.blurNode(node), {});}- async type(metadata: CallMetadata, text: string, options: { delay?: number } & types.NavigatingActionWaitOptions): Promise<void> {+ async type(metadata: CallMetadata, text: string, options: { delay?: number } & types.TimeoutOptions & types.StrictOptions): Promise<void> {const controller = new ProgressController(metadata, this);return controller.run(async progress => {const result = await this._type(progress, text, options);@@ -693,20 +698,18 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {}, this._page._timeoutSettings.timeout(options));}- async _type(progress: Progress, text: string, options: { delay?: number } & types.NavigatingActionWaitOptions): Promise<'error:notconnected' | 'done'> {+ async _type(progress: Progress, text: string, options: { delay?: number } & types.TimeoutOptions & types.StrictOptions): Promise<'error:notconnected' | 'done'> {progress.log(`elementHandle.type("${text}")`);await progress.beforeInputAction(this);- return this._page._frameManager.waitForSignalsCreatedBy(progress, options.noWaitAfter, async () => {- const result = await this._focus(progress, true /* resetSelectionIfNotFocused */);- if (result !== 'done')- return result;- progress.throwIfAborted(); // Avoid action that has side-effects.- await this._page.keyboard.type(text, options);- return 'done';- }, 'input');+ const result = await this._focus(progress, true /* resetSelectionIfNotFocused */);+ if (result !== 'done')+ return result;+ progress.throwIfAborted(); // Avoid action that has side-effects.+ await this._page.keyboard.type(text, options);+ return 'done';}- async press(metadata: CallMetadata, key: string, options: { delay?: number } & types.NavigatingActionWaitOptions): Promise<void> {+ async press(metadata: CallMetadata, key: string, options: { delay?: number, noWaitAfter?: boolean } & types.TimeoutOptions & types.StrictOptions): Promise<void> {const controller = new ProgressController(metadata, this);return controller.run(async progress => {const result = await this._press(progress, key, options);@@ -714,20 +717,20 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {}, this._page._timeoutSettings.timeout(options));}- async _press(progress: Progress, key: string, options: { delay?: number } & types.NavigatingActionWaitOptions): Promise<'error:notconnected' | 'done'> {+ async _press(progress: Progress, key: string, options: { delay?: number, noWaitAfter?: boolean } & types.TimeoutOptions & types.StrictOptions): Promise<'error:notconnected' | 'done'> {progress.log(`elementHandle.press("${key}")`);await progress.beforeInputAction(this);- return this._page._frameManager.waitForSignalsCreatedBy(progress, options.noWaitAfter, async () => {+ return this._page._frameManager.waitForSignalsCreatedBy(progress, !options.noWaitAfter, async () => {const result = await this._focus(progress, true /* resetSelectionIfNotFocused */);if (result !== 'done')return result;progress.throwIfAborted(); // Avoid action that has side-effects.await this._page.keyboard.press(key, options);return 'done';- }, 'input');+ });}- async check(metadata: CallMetadata, options: { position?: types.Point } & types.PointerActionWaitOptions & types.NavigatingActionWaitOptions) {+ async check(metadata: CallMetadata, options: { position?: types.Point } & types.PointerActionWaitOptions) {const controller = new ProgressController(metadata, this);return controller.run(async progress => {const result = await this._setChecked(progress, true, options);@@ -735,7 +738,7 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {}, this._page._timeoutSettings.timeout(options));}- async uncheck(metadata: CallMetadata, options: { position?: types.Point } & types.PointerActionWaitOptions & types.NavigatingActionWaitOptions) {+ async uncheck(metadata: CallMetadata, options: { position?: types.Point } & types.PointerActionWaitOptions) {const controller = new ProgressController(metadata, this);return controller.run(async progress => {const result = await this._setChecked(progress, false, options);@@ -743,14 +746,14 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {}, this._page._timeoutSettings.timeout(options));}- async _setChecked(progress: Progress, state: boolean, options: { position?: types.Point } & types.PointerActionWaitOptions & types.NavigatingActionWaitOptions): Promise<'error:notconnected' | 'done'> {+ async _setChecked(progress: Progress, state: boolean, options: { position?: types.Point } & types.PointerActionWaitOptions): Promise<'error:notconnected' | 'done'> {const isChecked = async () => {const result = await this.evaluateInUtility(([injected, node]) => injected.elementState(node, 'checked'), {});return throwRetargetableDOMError(result);};if (await isChecked() === state)return 'done';- const result = await this._click(progress, options);+ const result = await this._click(progress, { ...options, waitAfter: 'disabled' });if (result !== 'done')return result;if (options.trial)diff --git a/packages/playwright-core/src/server/frames.ts b/packages/playwright-core/src/server/frames.tsindex c5bf0ba24f..acd653e8b9 100644--- a/packages/playwright-core/src/server/frames.ts+++ b/packages/playwright-core/src/server/frames.ts@@ -161,16 +161,15 @@ export class FrameManager {}}- async waitForSignalsCreatedBy<T>(progress: Progress | null, noWaitAfter: boolean | undefined, action: () => Promise<T>, source?: 'input'): Promise<T> {- if (noWaitAfter)+ async waitForSignalsCreatedBy<T>(progress: Progress | null, waitAfter: boolean, action: () => Promise<T>): Promise<T> {+ if (!waitAfter)return action();const barrier = new SignalBarrier(progress);this._signalBarriers.add(barrier);if (progress)progress.cleanupWhenAborted(() => this._signalBarriers.delete(barrier));const result = await action();- if (source === 'input')- await this._page._delegate.inputActionEpilogue();+ await this._page._delegate.inputActionEpilogue();await barrier.waitFor();this._signalBarriers.delete(barrier);// Resolve in the next task, after all waitForNavigations.@@ -1154,21 +1153,21 @@ export class Frame extends SdkObject {});}- async click(metadata: CallMetadata, selector: string, options: types.MouseClickOptions & types.PointerActionWaitOptions & types.NavigatingActionWaitOptions) {+ async click(metadata: CallMetadata, selector: string, options: { noWaitAfter?: boolean } & types.MouseClickOptions & types.PointerActionWaitOptions) {const controller = new ProgressController(metadata, this);return controller.run(async progress => {- return dom.assertDone(await this._retryWithProgressIfNotConnected(progress, selector, options.strict, !options.force /* performLocatorHandlersCheckpoint */, handle => handle._click(progress, options)));+ return dom.assertDone(await this._retryWithProgressIfNotConnected(progress, selector, options.strict, !options.force /* performLocatorHandlersCheckpoint */, handle => handle._click(progress, { ...options, waitAfter: !options.noWaitAfter })));}, this._page._timeoutSettings.timeout(options));}- async dblclick(metadata: CallMetadata, selector: string, options: types.MouseMultiClickOptions & types.PointerActionWaitOptions & types.NavigatingActionWaitOptions = {}) {+ async dblclick(metadata: CallMetadata, selector: string, options: types.MouseMultiClickOptions & types.PointerActionWaitOptions = {}) {const controller = new ProgressController(metadata, this);return controller.run(async progress => {return dom.assertDone(await this._retryWithProgressIfNotConnected(progress, selector, options.strict, !options.force /* performLocatorHandlersCheckpoint */, handle => handle._dblclick(progress, options)));}, this._page._timeoutSettings.timeout(options));}- async dragAndDrop(metadata: CallMetadata, source: string, target: string, options: types.DragActionOptions & types.PointerActionWaitOptions & types.NavigatingActionWaitOptions = {}) {+ async dragAndDrop(metadata: CallMetadata, source: string, target: string, options: types.DragActionOptions & types.PointerActionWaitOptions = {}) {const controller = new ProgressController(metadata, this);await controller.run(async progress => {dom.assertDone(await this._retryWithProgressIfNotConnected(progress, source, options.strict, !options.force /* performLocatorHandlersCheckpoint */, async handle => {@@ -1177,6 +1176,7 @@ export class Frame extends SdkObject {await this._page.mouse.down();}, {...options,+ waitAfter: 'disabled',position: options.sourcePosition,timeout: progress.timeUntilDeadline(),});@@ -1188,6 +1188,7 @@ export class Frame extends SdkObject {await this._page.mouse.up();}, {...options,+ waitAfter: 'disabled',position: options.targetPosition,timeout: progress.timeUntilDeadline(),});@@ -1195,7 +1196,7 @@ export class Frame extends SdkObject {}, this._page._timeoutSettings.timeout(options));}- async tap(metadata: CallMetadata, selector: string, options: types.PointerActionWaitOptions & types.NavigatingActionWaitOptions) {+ async tap(metadata: CallMetadata, selector: string, options: types.PointerActionWaitOptions) {if (!this._page._browserContext._options.hasTouch)throw new Error('The page does not support tap. Use hasTouch context option to enable touch support.');const controller = new ProgressController(metadata, this);@@ -1204,7 +1205,7 @@ export class Frame extends SdkObject {}, this._page._timeoutSettings.timeout(options));}- async fill(metadata: CallMetadata, selector: string, value: string, options: types.NavigatingActionWaitOptions & { force?: boolean }) {+ async fill(metadata: CallMetadata, selector: string, value: string, options: types.TimeoutOptions & types.StrictOptions & { force?: boolean }) {const controller = new ProgressController(metadata, this);return controller.run(async progress => {return dom.assertDone(await this._retryWithProgressIfNotConnected(progress, selector, options.strict, !options.force /* performLocatorHandlersCheckpoint */, handle => handle._fill(progress, value, options)));@@ -1325,14 +1326,14 @@ export class Frame extends SdkObject {return this._elementState(metadata, selector, 'checked', options, scope);}- async hover(metadata: CallMetadata, selector: string, options: types.PointerActionOptions & types.PointerActionWaitOptions & types.NavigatingActionWaitOptions = {}) {+ async hover(metadata: CallMetadata, selector: string, options: types.PointerActionOptions & types.PointerActionWaitOptions = {}) {const controller = new ProgressController(metadata, this);return controller.run(async progress => {return dom.assertDone(await this._retryWithProgressIfNotConnected(progress, selector, options.strict, !options.force /* performLocatorHandlersCheckpoint */, handle => handle._hover(progress, options)));}, this._page._timeoutSettings.timeout(options));}- async selectOption(metadata: CallMetadata, selector: string, elements: dom.ElementHandle[], values: types.SelectOption[], options: types.NavigatingActionWaitOptions & types.ForceOptions = {}): Promise<string[]> {+ async selectOption(metadata: CallMetadata, selector: string, elements: dom.ElementHandle[], values: types.SelectOption[], options: { noWaitAfter?: boolean } & types.CommonActionOptions = {}): Promise<string[]> {const controller = new ProgressController(metadata, this);return controller.run(async progress => {return await this._retryWithProgressIfNotConnected(progress, selector, options.strict, !options.force /* performLocatorHandlersCheckpoint */, handle => handle._selectOption(progress, elements, values, options));@@ -1343,32 +1344,32 @@ export class Frame extends SdkObject {const inputFileItems = await prepareFilesForUpload(this, params);const controller = new ProgressController(metadata, this);return controller.run(async progress => {- return dom.assertDone(await this._retryWithProgressIfNotConnected(progress, selector, params.strict, true /* performLocatorHandlersCheckpoint */, handle => handle._setInputFiles(progress, inputFileItems, params)));+ return dom.assertDone(await this._retryWithProgressIfNotConnected(progress, selector, params.strict, true /* performLocatorHandlersCheckpoint */, handle => handle._setInputFiles(progress, inputFileItems)));}, this._page._timeoutSettings.timeout(params));}- async type(metadata: CallMetadata, selector: string, text: string, options: { delay?: number } & types.NavigatingActionWaitOptions = {}) {+ async type(metadata: CallMetadata, selector: string, text: string, options: { delay?: number } & types.TimeoutOptions & types.StrictOptions = {}) {const controller = new ProgressController(metadata, this);return controller.run(async progress => {return dom.assertDone(await this._retryWithProgressIfNotConnected(progress, selector, options.strict, true /* performLocatorHandlersCheckpoint */, handle => handle._type(progress, text, options)));}, this._page._timeoutSettings.timeout(options));}- async press(metadata: CallMetadata, selector: string, key: string, options: { delay?: number } & types.NavigatingActionWaitOptions = {}) {+ async press(metadata: CallMetadata, selector: string, key: string, options: { delay?: number, noWaitAfter?: boolean } & types.TimeoutOptions & types.StrictOptions = {}) {const controller = new ProgressController(metadata, this);return controller.run(async progress => {return dom.assertDone(await this._retryWithProgressIfNotConnected(progress, selector, options.strict, true /* performLocatorHandlersCheckpoint */, handle => handle._press(progress, key, options)));}, this._page._timeoutSettings.timeout(options));}- async check(metadata: CallMetadata, selector: string, options: types.PointerActionWaitOptions & types.NavigatingActionWaitOptions = {}) {+ async check(metadata: CallMetadata, selector: string, options: types.PointerActionWaitOptions = {}) {const controller = new ProgressController(metadata, this);return controller.run(async progress => {return dom.assertDone(await this._retryWithProgressIfNotConnected(progress, selector, options.strict, !options.force /* performLocatorHandlersCheckpoint */, handle => handle._setChecked(progress, true, options)));}, this._page._timeoutSettings.timeout(options));}- async uncheck(metadata: CallMetadata, selector: string, options: types.PointerActionWaitOptions & types.NavigatingActionWaitOptions = {}) {+ async uncheck(metadata: CallMetadata, selector: string, options: types.PointerActionWaitOptions = {}) {const controller = new ProgressController(metadata, this);return controller.run(async progress => {return dom.assertDone(await this._retryWithProgressIfNotConnected(progress, selector, options.strict, !options.force /* performLocatorHandlersCheckpoint */, handle => handle._setChecked(progress, false, options)));diff --git a/packages/playwright-core/src/server/types.ts b/packages/playwright-core/src/server/types.tsindex f1046d8825..66ebf2014c 100644--- a/packages/playwright-core/src/server/types.ts+++ b/packages/playwright-core/src/server/types.ts@@ -36,15 +36,11 @@ export type NavigateOptions = TimeoutOptions & {waitUntil?: LifecycleEvent,};-export type NavigatingActionWaitOptions = TimeoutOptions & StrictOptions & {- noWaitAfter?: boolean,-};--export type ForceOptions = {+export type CommonActionOptions = TimeoutOptions & StrictOptions & {force?: boolean,};-export type PointerActionWaitOptions = TimeoutOptions & ForceOptions & StrictOptions & {+export type PointerActionWaitOptions = CommonActionOptions & {trial?: boolean;};diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.tsindex fc468defe0..01665bfee4 100644--- a/packages/playwright-core/types/types.d.ts+++ b/packages/playwright-core/types/types.d.ts@@ -1939,7 +1939,6 @@ export interface Page {* 1. Scroll the element into view if needed.* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the* element.- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.* 1. Ensure that the element is now checked. If not, this method throws.** When all steps combined have not finished during the specified `timeout`, this method throws a {@link@@ -1955,9 +1954,8 @@ export interface Page {force?: boolean;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -2043,6 +2041,7 @@ export interface Page {* Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You* can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as* navigating to inaccessible pages. Defaults to `false`.+ * @deprecated This option will default to `true` in the future.*/noWaitAfter?: boolean;@@ -2121,8 +2120,6 @@ export interface Page {* 1. Scroll the element into view if needed.* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to double click in the center of the* element, or the specified `position`.- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set. Note that if- * the first click of the `dblclick()` triggers a navigation event, this method will throw.** When all steps combined have not finished during the specified `timeout`, this method throws a {@link* TimeoutError}. Passing zero timeout disables this.@@ -2156,9 +2153,8 @@ export interface Page {modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -2281,9 +2277,8 @@ export interface Page {force?: boolean;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -2464,9 +2459,8 @@ export interface Page {force?: boolean;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -3025,7 +3019,6 @@ export interface Page {* 1. Scroll the element into view if needed.* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to hover over the center of the* element, or the specified `position`.- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.** When all steps combined have not finished during the specified `timeout`, this method throws a {@link* TimeoutError}. Passing zero timeout disables this.@@ -3047,9 +3040,8 @@ export interface Page {modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -3604,6 +3596,7 @@ export interface Page {* Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You* can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as* navigating to inaccessible pages. Defaults to `false`.+ * @deprecated This option will default to `true` in the future.*/noWaitAfter?: boolean;@@ -3862,6 +3855,7 @@ export interface Page {* Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You* can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as* navigating to inaccessible pages. Defaults to `false`.+ * @deprecated This option will default to `true` in the future.*/noWaitAfter?: boolean;@@ -3894,7 +3888,6 @@ export interface Page {* 1. Scroll the element into view if needed.* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the* element.- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.* 1. Ensure that the element is now checked or unchecked. If not, this method throws.** When all steps combined have not finished during the specified `timeout`, this method throws a {@link@@ -3911,9 +3904,8 @@ export interface Page {force?: boolean;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -4069,9 +4061,8 @@ export interface Page {buffer: Buffer;}>, options?: {/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -4139,7 +4130,6 @@ export interface Page {* 1. Scroll the element into view if needed.* 1. Use [page.touchscreen](https://playwright.dev/docs/api/class-page#page-touchscreen) to tap the center of the* element, or the specified `position`.- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.** When all steps combined have not finished during the specified `timeout`, this method throws a {@link* TimeoutError}. Passing zero timeout disables this.@@ -4164,9 +4154,8 @@ export interface Page {modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -4257,9 +4246,8 @@ export interface Page {delay?: number;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -4291,7 +4279,6 @@ export interface Page {* 1. Scroll the element into view if needed.* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the* element.- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.* 1. Ensure that the element is now unchecked. If not, this method throws.** When all steps combined have not finished during the specified `timeout`, this method throws a {@link@@ -4307,9 +4294,8 @@ export interface Page {force?: boolean;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -5644,7 +5630,6 @@ export interface Frame {* 1. Scroll the element into view if needed.* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the* element.- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.* 1. Ensure that the element is now checked. If not, this method throws.** When all steps combined have not finished during the specified `timeout`, this method throws a {@link@@ -5660,9 +5645,8 @@ export interface Frame {force?: boolean;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -5750,6 +5734,7 @@ export interface Frame {* Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You* can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as* navigating to inaccessible pages. Defaults to `false`.+ * @deprecated This option will default to `true` in the future.*/noWaitAfter?: boolean;@@ -5799,9 +5784,8 @@ export interface Frame {* 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#page-mouse) to double click in the center of the- * element, or the specified `position`.- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set. Note that if- * the first click of the `dblclick()` triggers a navigation event, this method will throw.+ * element, or the specified `position`. 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 `timeout`, this method throws a {@link* TimeoutError}. Passing zero timeout disables this.@@ -5835,9 +5819,8 @@ export interface Frame {modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -5946,9 +5929,8 @@ export interface Frame {force?: boolean;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -6020,9 +6002,8 @@ export interface Frame {force?: boolean;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -6507,7 +6488,6 @@ export interface Frame {* 1. Scroll the element into view if needed.* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to hover over the center of the* element, or the specified `position`.- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.** When all steps combined have not finished during the specified `timeout`, this method throws a {@link* TimeoutError}. Passing zero timeout disables this.@@ -6529,9 +6509,8 @@ export interface Frame {modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -6907,6 +6886,7 @@ export interface Frame {* Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You* can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as* navigating to inaccessible pages. Defaults to `false`.+ * @deprecated This option will default to `true` in the future.*/noWaitAfter?: boolean;@@ -7001,6 +6981,7 @@ export interface Frame {* Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You* can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as* navigating to inaccessible pages. Defaults to `false`.+ * @deprecated This option will default to `true` in the future.*/noWaitAfter?: boolean;@@ -7033,7 +7014,6 @@ export interface Frame {* 1. Scroll the element into view if needed.* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the* element.- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.* 1. Ensure that the element is now checked or unchecked. If not, this method throws.** When all steps combined have not finished during the specified `timeout`, this method throws a {@link@@ -7050,9 +7030,8 @@ export interface Frame {force?: boolean;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -7165,9 +7144,8 @@ export interface Frame {buffer: Buffer;}>, options?: {/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -7197,7 +7175,6 @@ export interface Frame {* 1. Scroll the element into view if needed.* 1. Use [page.touchscreen](https://playwright.dev/docs/api/class-page#page-touchscreen) to tap the center of the* element, or the specified `position`.- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.** When all steps combined have not finished during the specified `timeout`, this method throws a {@link* TimeoutError}. Passing zero timeout disables this.@@ -7221,9 +7198,8 @@ export interface Frame {modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -7314,9 +7290,8 @@ export interface Frame {delay?: number;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -7348,7 +7323,6 @@ export interface Frame {* 1. Scroll the element into view if needed.* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the* element.- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.* 1. Ensure that the element is now unchecked. If not, this method throws.** When all steps combined have not finished during the specified `timeout`, this method throws a {@link@@ -7364,9 +7338,8 @@ export interface Frame {force?: boolean;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -9714,7 +9687,6 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {* 1. Scroll the element into view if needed.* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the* element.- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.* 1. Ensure that the element is now checked. If not, this method throws.** If the element is detached from the DOM at any moment during the action, this method throws.@@ -9730,9 +9702,8 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {force?: boolean;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -9810,6 +9781,7 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {* Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You* can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as* navigating to inaccessible pages. Defaults to `false`.+ * @deprecated This option will default to `true` in the future.*/noWaitAfter?: boolean;@@ -9852,8 +9824,6 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {* 1. Scroll the element into view if needed.* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to double click in the center of the* element, or the specified `position`.- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set. Note that if- * the first click of the `dblclick()` triggers a navigation event, this method will throw.** If the element is detached from the DOM at any moment during the action, this method throws.*@@ -9887,9 +9857,8 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -9985,9 +9954,8 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {force?: boolean;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -10027,7 +9995,6 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {* 1. Scroll the element into view if needed.* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to hover over the center of the* 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 throws.*@@ -10049,9 +10016,8 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -10213,6 +10179,7 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {* Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You* can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as* navigating to inaccessible pages. Defaults to `false`.+ * @deprecated This option will default to `true` in the future.*/noWaitAfter?: boolean;@@ -10416,6 +10383,7 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {* Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You* can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as* navigating to inaccessible pages. Defaults to `false`.+ * @deprecated This option will default to `true` in the future.*/noWaitAfter?: boolean;@@ -10469,7 +10437,6 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {* 1. Scroll the element into view if needed.* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the* element.- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.* 1. Ensure that the element is now checked or unchecked. If not, this method throws.** When all steps combined have not finished during the specified `timeout`, this method throws a {@link@@ -10484,9 +10451,8 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {force?: boolean;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -10563,9 +10529,8 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {buffer: Buffer;}>, options?: {/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -10587,7 +10552,6 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {* 1. Scroll the element into view if needed.* 1. Use [page.touchscreen](https://playwright.dev/docs/api/class-page#page-touchscreen) to tap the center of the* 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 throws.*@@ -10611,9 +10575,8 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -10673,9 +10636,8 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {delay?: number;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -10699,7 +10661,6 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {* 1. Scroll the element into view if needed.* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the* element.- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.* 1. Ensure that the element is now unchecked. If not, this method throws.** If the element is detached from the DOM at any moment during the action, this method throws.@@ -10715,9 +10676,8 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {force?: boolean;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -11097,7 +11057,6 @@ export interface Locator {* 1. Scroll the element into view if needed.* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the* element.- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.* 1. Ensure that the element is now checked. If not, this method throws.** If the element is detached from the DOM at any moment during the action, this method throws.@@ -11120,9 +11079,8 @@ export interface Locator {force?: boolean;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -11179,9 +11137,8 @@ export interface Locator {force?: boolean;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -11263,6 +11220,7 @@ export interface Locator {* Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You* can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as* navigating to inaccessible pages. Defaults to `false`.+ * @deprecated This option will default to `true` in the future.*/noWaitAfter?: boolean;@@ -11338,8 +11296,6 @@ export interface Locator {* 1. Scroll the element into view if needed.* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to double click in the center of the* element, or the specified `position`.- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set. Note that if- * the first click of the `dblclick()` triggers a navigation event, this method will throw.** If the element is detached from the DOM at any moment during the action, this method throws.*@@ -11373,9 +11329,8 @@ export interface Locator {modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -11488,9 +11443,8 @@ export interface Locator {force?: boolean;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -11568,9 +11522,8 @@ export interface Locator {force?: boolean;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -12025,7 +11978,6 @@ export interface Locator {* 1. Scroll the element into view if needed.* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to hover over the center of the* 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 throws.*@@ -12047,9 +11999,8 @@ export interface Locator {modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -12434,6 +12385,7 @@ export interface Locator {* Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You* can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as* navigating to inaccessible pages. Defaults to `false`.+ * @deprecated This option will default to `true` in the future.*/noWaitAfter?: boolean;@@ -12482,9 +12434,8 @@ export interface Locator {delay?: number;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -12627,6 +12578,7 @@ export interface Locator {* Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You* can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as* navigating to inaccessible pages. Defaults to `false`.+ * @deprecated This option will default to `true` in the future.*/noWaitAfter?: boolean;@@ -12682,7 +12634,6 @@ export interface Locator {* 1. Scroll the element into view if needed.* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the* element.- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.* 1. Ensure that the element is now checked or unchecked. If not, this method throws.** When all steps combined have not finished during the specified `timeout`, this method throws a {@link@@ -12697,9 +12648,8 @@ export interface Locator {force?: boolean;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -12802,9 +12752,8 @@ export interface Locator {buffer: Buffer;}>, options?: {/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -12827,7 +12776,6 @@ export interface Locator {* 1. Scroll the element into view if needed.* 1. Use [page.touchscreen](https://playwright.dev/docs/api/class-page#page-touchscreen) to tap the center of the* 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 throws.*@@ -12851,9 +12799,8 @@ export interface Locator {modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -12922,9 +12869,8 @@ export interface Locator {delay?: number;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -12955,7 +12901,6 @@ export interface Locator {* 1. Scroll the element into view if needed.* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the* element.- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.* 1. Ensure that the element is now unchecked. If not, this method throws.** If the element is detached from the DOM at any moment during the action, this method throws.@@ -12971,9 +12916,8 @@ export interface Locator {force?: boolean;/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;@@ -18138,9 +18082,8 @@ export interface FileChooser {buffer: Buffer;}>, options?: {/**- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You- * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as- * navigating to inaccessible pages. Defaults to `false`.+ * This option has no effect.+ * @deprecated This option has no effect.*/noWaitAfter?: boolean;diff --git a/packages/protocol/src/channels.ts b/packages/protocol/src/channels.tsindex 412f3c8e3c..2efa1c8065 100644--- a/packages/protocol/src/channels.ts+++ b/packages/protocol/src/channels.ts@@ -2611,7 +2611,6 @@ export type FrameCheckParams = {selector: string,strict?: boolean,force?: boolean,- noWaitAfter?: boolean,position?: Point,timeout?: number,trial?: boolean,@@ -2619,7 +2618,6 @@ export type FrameCheckParams = {export type FrameCheckOptions = {strict?: boolean,force?: boolean,- noWaitAfter?: boolean,position?: Point,timeout?: number,trial?: boolean,@@ -2660,7 +2658,6 @@ export type FrameDragAndDropParams = {source: string,target: string,force?: boolean,- noWaitAfter?: boolean,timeout?: number,trial?: boolean,sourcePosition?: Point,@@ -2669,7 +2666,6 @@ export type FrameDragAndDropParams = {};export type FrameDragAndDropOptions = {force?: boolean,- noWaitAfter?: boolean,timeout?: number,trial?: boolean,sourcePosition?: Point,@@ -2681,7 +2677,6 @@ export type FrameDblclickParams = {selector: string,strict?: boolean,force?: boolean,- noWaitAfter?: boolean,modifiers?: ('Alt' | 'Control' | 'ControlOrMeta' | 'Meta' | 'Shift')[],position?: Point,delay?: number,@@ -2692,7 +2687,6 @@ export type FrameDblclickParams = {export type FrameDblclickOptions = {strict?: boolean,force?: boolean,- noWaitAfter?: boolean,modifiers?: ('Alt' | 'Control' | 'ControlOrMeta' | 'Meta' | 'Shift')[],position?: Point,delay?: number,@@ -2741,13 +2735,11 @@ export type FrameFillParams = {value: string,force?: boolean,timeout?: number,- noWaitAfter?: boolean,};export type FrameFillOptions = {strict?: boolean,force?: boolean,timeout?: number,- noWaitAfter?: boolean,};export type FrameFillResult = void;export type FrameFocusParams = {@@ -2807,7 +2799,6 @@ export type FrameHoverParams = {position?: Point,timeout?: number,trial?: boolean,- noWaitAfter?: boolean,};export type FrameHoverOptions = {strict?: boolean,@@ -2816,7 +2807,6 @@ export type FrameHoverOptions = {position?: Point,timeout?: number,trial?: boolean,- noWaitAfter?: boolean,};export type FrameHoverResult = void;export type FrameInnerHTMLParams = {@@ -3019,7 +3009,6 @@ export type FrameSetInputFilesParams = {localPaths?: string[],streams?: WritableStreamChannel[],timeout?: number,- noWaitAfter?: boolean,};export type FrameSetInputFilesOptions = {strict?: boolean,@@ -3033,14 +3022,12 @@ export type FrameSetInputFilesOptions = {localPaths?: string[],streams?: WritableStreamChannel[],timeout?: number,- noWaitAfter?: boolean,};export type FrameSetInputFilesResult = void;export type FrameTapParams = {selector: string,strict?: boolean,force?: boolean,- noWaitAfter?: boolean,modifiers?: ('Alt' | 'Control' | 'ControlOrMeta' | 'Meta' | 'Shift')[],position?: Point,timeout?: number,@@ -3049,7 +3036,6 @@ export type FrameTapParams = {export type FrameTapOptions = {strict?: boolean,force?: boolean,- noWaitAfter?: boolean,modifiers?: ('Alt' | 'Control' | 'ControlOrMeta' | 'Meta' | 'Shift')[],position?: Point,timeout?: number,@@ -3078,13 +3064,11 @@ export type FrameTypeParams = {strict?: boolean,text: string,delay?: number,- noWaitAfter?: boolean,timeout?: number,};export type FrameTypeOptions = {strict?: boolean,delay?: number,- noWaitAfter?: boolean,timeout?: number,};export type FrameTypeResult = void;@@ -3092,7 +3076,6 @@ export type FrameUncheckParams = {selector: string,strict?: boolean,force?: boolean,- noWaitAfter?: boolean,position?: Point,timeout?: number,trial?: boolean,@@ -3100,7 +3083,6 @@ export type FrameUncheckParams = {export type FrameUncheckOptions = {strict?: boolean,force?: boolean,- noWaitAfter?: boolean,position?: Point,timeout?: number,trial?: boolean,@@ -3368,14 +3350,12 @@ export type ElementHandleBoundingBoxResult = {};export type ElementHandleCheckParams = {force?: boolean,- noWaitAfter?: boolean,position?: Point,timeout?: number,trial?: boolean,};export type ElementHandleCheckOptions = {force?: boolean,- noWaitAfter?: boolean,position?: Point,timeout?: number,trial?: boolean,@@ -3411,7 +3391,6 @@ export type ElementHandleContentFrameResult = {};export type ElementHandleDblclickParams = {force?: boolean,- noWaitAfter?: boolean,modifiers?: ('Alt' | 'Control' | 'ControlOrMeta' | 'Meta' | 'Shift')[],position?: Point,delay?: number,@@ -3421,7 +3400,6 @@ export type ElementHandleDblclickParams = {};export type ElementHandleDblclickOptions = {force?: boolean,- noWaitAfter?: boolean,modifiers?: ('Alt' | 'Control' | 'ControlOrMeta' | 'Meta' | 'Shift')[],position?: Point,delay?: number,@@ -3442,12 +3420,10 @@ export type ElementHandleFillParams = {value: string,force?: boolean,timeout?: number,- noWaitAfter?: boolean,};export type ElementHandleFillOptions = {force?: boolean,timeout?: number,- noWaitAfter?: boolean,};export type ElementHandleFillResult = void;export type ElementHandleFocusParams = {};@@ -3468,7 +3444,6 @@ export type ElementHandleHoverParams = {position?: Point,timeout?: number,trial?: boolean,- noWaitAfter?: boolean,};export type ElementHandleHoverOptions = {force?: boolean,@@ -3476,7 +3451,6 @@ export type ElementHandleHoverOptions = {position?: Point,timeout?: number,trial?: boolean,- noWaitAfter?: boolean,};export type ElementHandleHoverResult = void;export type ElementHandleInnerHTMLParams = {};@@ -3647,7 +3621,6 @@ export type ElementHandleSetInputFilesParams = {localPaths?: string[],streams?: WritableStreamChannel[],timeout?: number,- noWaitAfter?: boolean,};export type ElementHandleSetInputFilesOptions = {payloads?: {@@ -3660,12 +3633,10 @@ export type ElementHandleSetInputFilesOptions = {localPaths?: string[],streams?: WritableStreamChannel[],timeout?: number,- noWaitAfter?: boolean,};export type ElementHandleSetInputFilesResult = void;export type ElementHandleTapParams = {force?: boolean,- noWaitAfter?: boolean,modifiers?: ('Alt' | 'Control' | 'ControlOrMeta' | 'Meta' | 'Shift')[],position?: Point,timeout?: number,@@ -3673,7 +3644,6 @@ export type ElementHandleTapParams = {};export type ElementHandleTapOptions = {force?: boolean,- noWaitAfter?: boolean,modifiers?: ('Alt' | 'Control' | 'ControlOrMeta' | 'Meta' | 'Shift')[],position?: Point,timeout?: number,@@ -3688,25 +3658,21 @@ export type ElementHandleTextContentResult = {export type ElementHandleTypeParams = {text: string,delay?: number,- noWaitAfter?: boolean,timeout?: number,};export type ElementHandleTypeOptions = {delay?: number,- noWaitAfter?: boolean,timeout?: number,};export type ElementHandleTypeResult = void;export type ElementHandleUncheckParams = {force?: boolean,- noWaitAfter?: boolean,position?: Point,timeout?: number,trial?: boolean,};export type ElementHandleUncheckOptions = {force?: boolean,- noWaitAfter?: boolean,position?: Point,timeout?: number,trial?: boolean,diff --git a/packages/protocol/src/protocol.yml b/packages/protocol/src/protocol.ymlindex f0616a7a25..b67c8f357e 100644--- a/packages/protocol/src/protocol.yml+++ b/packages/protocol/src/protocol.yml@@ -1881,7 +1881,6 @@ Frame:selector: stringstrict: boolean?force: boolean?- noWaitAfter: boolean?position: Point?timeout: number?trial: boolean?@@ -1931,7 +1930,6 @@ Frame:source: stringtarget: stringforce: boolean?- noWaitAfter: boolean?timeout: number?trial: boolean?sourcePosition: Point?@@ -1947,7 +1945,6 @@ Frame:selector: stringstrict: boolean?force: boolean?- noWaitAfter: boolean?modifiers:type: array?items:@@ -2011,7 +2008,6 @@ Frame:value: stringforce: boolean?timeout: number?- noWaitAfter: boolean?flags:slowMo: truesnapshot: true@@ -2075,7 +2071,6 @@ Frame:position: Point?timeout: number?trial: boolean?- noWaitAfter: boolean?flags:slowMo: truesnapshot: true@@ -2261,7 +2256,6 @@ Frame:type: array?items: WritableStreamtimeout: number?- noWaitAfter: boolean?flags:slowMo: truesnapshot: true@@ -2272,7 +2266,6 @@ Frame:selector: stringstrict: boolean?force: boolean?- noWaitAfter: boolean?modifiers:type: array?items:@@ -2311,7 +2304,6 @@ Frame:strict: boolean?text: stringdelay: number?- noWaitAfter: boolean?timeout: number?flags:slowMo: true@@ -2323,7 +2315,6 @@ Frame:selector: stringstrict: boolean?force: boolean?- noWaitAfter: boolean?position: Point?timeout: number?trial: boolean?@@ -2539,7 +2530,6 @@ ElementHandle:check:parameters:force: boolean?- noWaitAfter: boolean?position: Point?timeout: number?trial: boolean?@@ -2585,7 +2575,6 @@ ElementHandle:dblclick:parameters:force: boolean?- noWaitAfter: boolean?modifiers:type: array?items:@@ -2624,7 +2613,6 @@ ElementHandle:value: stringforce: boolean?timeout: number?- noWaitAfter: boolean?flags:slowMo: truesnapshot: true@@ -2657,7 +2645,6 @@ ElementHandle:position: Point?timeout: number?trial: boolean?- noWaitAfter: boolean?flags:slowMo: truesnapshot: true@@ -2823,7 +2810,6 @@ ElementHandle:type: array?items: WritableStreamtimeout: number?- noWaitAfter: boolean?flags:slowMo: truesnapshot: true@@ -2832,7 +2818,6 @@ ElementHandle:tap:parameters:force: boolean?- noWaitAfter: boolean?modifiers:type: array?items:@@ -2861,7 +2846,6 @@ ElementHandle:parameters:text: stringdelay: number?- noWaitAfter: boolean?timeout: number?flags:slowMo: true@@ -2871,7 +2855,6 @@ ElementHandle:uncheck:parameters:force: boolean?- noWaitAfter: boolean?position: Point?timeout: number?trial: boolean?diff --git a/tests/library/tap.spec.ts b/tests/library/tap.spec.tsindex 56adabfe41..c523be9e86 100644--- a/tests/library/tap.spec.ts+++ b/tests/library/tap.spec.ts@@ -16,7 +16,6 @@import { contextTest as it, expect } from '../config/browserTest';import type { ElementHandle } from 'playwright-core';-import type { ServerResponse } from 'http';it.use({ hasTouch: true });@@ -83,27 +82,13 @@ it('should not send mouse events when touchend is canceled', async ({ page }) =>]);});-it('should wait for a navigation caused by a tap', async ({ page, server }) => {+it('should not wait for a navigation caused by a tap', async ({ page, server }) => {await page.goto(server.EMPTY_PAGE);- await page.setContent(`- <a href="/intercept-this.html">link</a>;-`);- const responsePromise = new Promise<ServerResponse>(resolve => {- server.setRoute('/intercept-this.html', (handler, response) => {- resolve(response);- });- });- let resolved = false;- const tapPromise = page.tap('a').then(() => resolved = true);- const response = await responsePromise;- // make sure the tap doesn't resolve too early- await new Promise(x => setTimeout(x, 100));- expect(resolved).toBe(false);-- response.end('foo');-- await tapPromise;- expect(resolved).toBe(true);+ await page.setContent(`<a href="/intercept-this.html">link</a>;`);+ await Promise.all([+ new Promise(resolve => server.setRoute('/intercept-this.html', resolve)),+ page.tap('a'),+ ]);});it('should work with modifiers', async ({ page }) => {diff --git a/tests/page/locator-misc-1.spec.ts b/tests/page/locator-misc-1.spec.tsindex b861db45f2..0174536898 100644--- a/tests/page/locator-misc-1.spec.ts+++ b/tests/page/locator-misc-1.spec.ts@@ -33,16 +33,6 @@ it('should hover when Node is removed', async ({ page, server }) => {expect(await page.evaluate(() => document.querySelector('button:hover').id)).toBe('button-6');});-it('hover should support noWaitAfter', async ({ page, server }) => {- await page.goto(server.EMPTY_PAGE);- await page.setContent(`<button onmouseover='location.href="${server.PREFIX}/next"'>GO</button>`);- await Promise.all([- new Promise(fulfill => server.setRoute('/next', fulfill)),- page.locator('button').hover({ noWaitAfter: true })- ]);- expect(page.url()).toBe(server.EMPTY_PAGE);-});-it('should fill input', async ({ page, server }) => {await page.goto(server.PREFIX + '/input/textarea.html');const handle = page.locator('input');diff --git a/tests/page/page-autowaiting-basic.spec.ts b/tests/page/page-autowaiting-basic.spec.tsindex a9d36bdeb5..a2104530ef 100644--- a/tests/page/page-autowaiting-basic.spec.ts+++ b/tests/page/page-autowaiting-basic.spec.ts@@ -96,10 +96,10 @@ it('should work with noWaitAfter: true', async ({ page, server }) => {await page.click('a', { noWaitAfter: true });});-it('should work with dblclick noWaitAfter: true', async ({ page, server }) => {+it('should work with dblclick without noWaitAfter when navigation is stalled', async ({ page, server }) => {server.setRoute('/empty.html', async () => {});await page.setContent(`<a id="anchor" href="${server.EMPTY_PAGE}">empty.html</a>`);- await page.dblclick('a', { noWaitAfter: true });+ await page.dblclick('a');});it('should work with waitForLoadState(load)', async ({ page, server }) => {diff --git a/tests/page/page-mouse.spec.ts b/tests/page/page-mouse.spec.tsindex 5ae7de6508..3e7223319f 100644--- a/tests/page/page-mouse.spec.ts+++ b/tests/page/page-mouse.spec.ts@@ -173,16 +173,6 @@ it('should trigger hover state', async ({ page, server }) => {expect(await page.evaluate(() => document.querySelector('button:hover').id)).toBe('button-91');});-it('hover should support noWaitAfter', async ({ page, server }) => {- await page.goto(server.EMPTY_PAGE);- await page.setContent(`<button onmouseover='location.href="${server.PREFIX}/next"'>GO</button>`);- await Promise.all([- new Promise(fulfill => server.setRoute('/next', fulfill)),- page.hover('button', { noWaitAfter: true })- ]);- expect(page.url()).toBe(server.EMPTY_PAGE);-});-it('should trigger hover state on disabled button', async ({ page, server }) => {await page.goto(server.PREFIX + '/input/scrollable.html');await page.$eval('#button-6', (button: HTMLButtonElement) => button.disabled = true);