Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs(tap): fix awkward grammar in hasTouch note (#40958)

Aditya Singh907f8b7d80c3
diff --git a/docs/src/api/class-page.md b/docs/src/api/class-page.md
index 1074568d20..ad2778b81b 100644
--- a/docs/src/api/class-page.md
+++ b/docs/src/api/class-page.md
@@ -4299,7 +4299,7 @@ When all steps combined have not finished during the specified [`option: timeout
[TimeoutError]. Passing zero timeout disables this.
:::note
-[`method: Page.tap`] the method will throw if [`option: Browser.newContext.hasTouch`] option of the browser context is false.
+[`method: Page.tap`] will throw if the [`option: Browser.newContext.hasTouch`] option of the browser context is false.
:::
### param: Page.tap.selector = %%-input-selector-%%
diff --git a/docs/src/api/class-touchscreen.md b/docs/src/api/class-touchscreen.md
index d7871addd7..56af3301c1 100644
--- a/docs/src/api/class-touchscreen.md
+++ b/docs/src/api/class-touchscreen.md
@@ -12,7 +12,7 @@ This class is limited to emulating tap gestures. For examples of other gestures
Dispatches a `touchstart` and `touchend` event with a single touch at the position ([`param: x`],[`param: y`]).
:::note
-[`method: Page.tap`] the method will throw if [`option: Browser.newContext.hasTouch`] option of the browser context is false.
+[`method: Touchscreen.tap`] will throw if the [`option: Browser.newContext.hasTouch`] option of the browser context is false.
:::
### param: Touchscreen.tap.x
diff --git a/packages/playwright-client/types/types.d.ts b/packages/playwright-client/types/types.d.ts
index 85617e01e8..c6248527f4 100644
--- a/packages/playwright-client/types/types.d.ts
+++ b/packages/playwright-client/types/types.d.ts
@@ -4530,8 +4530,8 @@ export interface Page {
* [`timeout`](https://playwright.dev/docs/api/class-page#page-tap-option-timeout), this method throws a
* [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
*
- * **NOTE** [page.tap(selector[, options])](https://playwright.dev/docs/api/class-page#page-tap) the method will throw
- * if [`hasTouch`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-has-touch) option of the
+ * **NOTE** [page.tap(selector[, options])](https://playwright.dev/docs/api/class-page#page-tap) will throw if the
+ * [`hasTouch`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-has-touch) option of the
* browser context is false.
*
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
@@ -21581,8 +21581,8 @@ export interface Touchscreen {
* Dispatches a `touchstart` and `touchend` event with a single touch at the position
* ([`x`](https://playwright.dev/docs/api/class-touchscreen#touchscreen-tap-option-x),[`y`](https://playwright.dev/docs/api/class-touchscreen#touchscreen-tap-option-y)).
*
- * **NOTE** [page.tap(selector[, options])](https://playwright.dev/docs/api/class-page#page-tap) the method will throw
- * if [`hasTouch`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-has-touch) option of the
+ * **NOTE** [touchscreen.tap(x, y)](https://playwright.dev/docs/api/class-touchscreen#touchscreen-tap) will throw if
+ * the [`hasTouch`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-has-touch) option of the
* browser context is false.
*
* @param x X coordinate relative to the main frame's viewport in CSS pixels.
diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts
index 85617e01e8..c6248527f4 100644
--- a/packages/playwright-core/types/types.d.ts
+++ b/packages/playwright-core/types/types.d.ts
@@ -4530,8 +4530,8 @@ export interface Page {
* [`timeout`](https://playwright.dev/docs/api/class-page#page-tap-option-timeout), this method throws a
* [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
*
- * **NOTE** [page.tap(selector[, options])](https://playwright.dev/docs/api/class-page#page-tap) the method will throw
- * if [`hasTouch`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-has-touch) option of the
+ * **NOTE** [page.tap(selector[, options])](https://playwright.dev/docs/api/class-page#page-tap) will throw if the
+ * [`hasTouch`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-has-touch) option of the
* browser context is false.
*
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
@@ -21581,8 +21581,8 @@ export interface Touchscreen {
* Dispatches a `touchstart` and `touchend` event with a single touch at the position
* ([`x`](https://playwright.dev/docs/api/class-touchscreen#touchscreen-tap-option-x),[`y`](https://playwright.dev/docs/api/class-touchscreen#touchscreen-tap-option-y)).
*
- * **NOTE** [page.tap(selector[, options])](https://playwright.dev/docs/api/class-page#page-tap) the method will throw
- * if [`hasTouch`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-has-touch) option of the
+ * **NOTE** [touchscreen.tap(x, y)](https://playwright.dev/docs/api/class-touchscreen#touchscreen-tap) will throw if
+ * the [`hasTouch`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-has-touch) option of the
* browser context is false.
*
* @param x X coordinate relative to the main frame's viewport in CSS pixels.