From 153b13c02c20512477e11edd106b2b2edfddd7e7 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Fri, 20 Sep 2024 19:10:40 +0200 Subject: [PATCH] docs(click): mention that trial emits keydown/keyup if modifier is given --- docs/src/api/class-elementhandle.md | 5 ++++- docs/src/api/class-frame.md | 5 ++++- docs/src/api/class-locator.md | 5 ++++- docs/src/api/class-page.md | 5 ++++- packages/playwright-core/types/types.d.ts | 20 ++++++++++++-------- 5 files changed, 28 insertions(+), 12 deletions(-) diff --git a/docs/src/api/class-elementhandle.md b/docs/src/api/class-elementhandle.md index c8f54c7380..7992df18c5 100644 --- a/docs/src/api/class-elementhandle.md +++ b/docs/src/api/class-elementhandle.md @@ -231,8 +231,11 @@ When all steps combined have not finished during the specified [`option: timeout ### option: ElementHandle.click.timeout = %%-input-timeout-js-%% * since: v1.8 -### option: ElementHandle.click.trial = %%-input-trial-%% +### option: ElementHandle.click.trial * since: v1.11 +- `trial` <[boolean]> + +When set, this method only performs the [actionability](../actionability.md) checks, emits a `keydown`/`keyup` event if a `modifier` is passed and skips the action. Defaults to `false`. Useful to wait until the element is ready for the action without performing it. ## async method: ElementHandle.contentFrame * since: v1.8 diff --git a/docs/src/api/class-frame.md b/docs/src/api/class-frame.md index f3f308622f..3720a8f12f 100644 --- a/docs/src/api/class-frame.md +++ b/docs/src/api/class-frame.md @@ -280,8 +280,11 @@ When all steps combined have not finished during the specified [`option: timeout ### option: Frame.click.timeout = %%-input-timeout-js-%% * since: v1.8 -### option: Frame.click.trial = %%-input-trial-%% +### option: Frame.click.trial * since: v1.11 +- `trial` <[boolean]> + +When set, this method only performs the [actionability](../actionability.md) checks, emits a `keydown`/`keyup` event if a `modifier` is passed and skips the action. Defaults to `false`. Useful to wait until the element is ready for the action without performing it. ## async method: Frame.content * since: v1.8 diff --git a/docs/src/api/class-locator.md b/docs/src/api/class-locator.md index 88658b5494..31f8688898 100644 --- a/docs/src/api/class-locator.md +++ b/docs/src/api/class-locator.md @@ -433,8 +433,11 @@ await page.Locator("canvas").ClickAsync(new() { ### option: Locator.click.timeout = %%-input-timeout-js-%% * since: v1.14 -### option: Locator.click.trial = %%-input-trial-%% +### option: Locator.click.trial * since: v1.14 +- `trial` <[boolean]> + +When set, this method only performs the [actionability](../actionability.md) checks, emits a `keydown`/`keyup` event if a `modifier` is passed and skips the action. Defaults to `false`. Useful to wait until the element is ready for the action without performing it. ## async method: Locator.count * since: v1.14 diff --git a/docs/src/api/class-page.md b/docs/src/api/class-page.md index c0890d04ff..a450923778 100644 --- a/docs/src/api/class-page.md +++ b/docs/src/api/class-page.md @@ -812,8 +812,11 @@ When all steps combined have not finished during the specified [`option: timeout ### option: Page.click.timeout = %%-input-timeout-js-%% * since: v1.8 -### option: Page.click.trial = %%-input-trial-%% +### option: Page.click.trial * since: v1.11 +- `trial` <[boolean]> + +When set, this method only performs the [actionability](../actionability.md) checks, emits a `keydown`/`keyup` event if a `modifier` is passed and skips the action. Defaults to `false`. Useful to wait until the element is ready for the action without performing it. ## async method: Page.close * since: v1.8 diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts index d6d4e7f39b..e6455d156f 100644 --- a/packages/playwright-core/types/types.d.ts +++ b/packages/playwright-core/types/types.d.ts @@ -2119,8 +2119,9 @@ export interface Page { timeout?: number; /** - * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults - * to `false`. Useful to wait until the element is ready for the action without performing it. + * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks, emits a `keydown`/`keyup` + * event if a `modifier` is passed and skips the action. Defaults to `false`. Useful to wait until the element is + * ready for the action without performing it. */ trial?: boolean; }): Promise; @@ -5844,8 +5845,9 @@ export interface Frame { timeout?: number; /** - * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults - * to `false`. Useful to wait until the element is ready for the action without performing it. + * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks, emits a `keydown`/`keyup` + * event if a `modifier` is passed and skips the action. Defaults to `false`. Useful to wait until the element is + * ready for the action without performing it. */ trial?: boolean; }): Promise; @@ -10607,8 +10609,9 @@ export interface ElementHandle extends JSHandle { timeout?: number; /** - * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults - * to `false`. Useful to wait until the element is ready for the action without performing it. + * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks, emits a `keydown`/`keyup` + * event if a `modifier` is passed and skips the action. Defaults to `false`. Useful to wait until the element is + * ready for the action without performing it. */ trial?: boolean; }): Promise; @@ -12044,8 +12047,9 @@ export interface Locator { timeout?: number; /** - * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults - * to `false`. Useful to wait until the element is ready for the action without performing it. + * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks, emits a `keydown`/`keyup` + * event if a `modifier` is passed and skips the action. Defaults to `false`. Useful to wait until the element is + * ready for the action without performing it. */ trial?: boolean; }): Promise;