diff --git a/packages/playwright-client/types/types.d.ts b/packages/playwright-client/types/types.d.ts index 2acee94c525e7..b14199edc3f72 100644 --- a/packages/playwright-client/types/types.d.ts +++ b/packages/playwright-client/types/types.d.ts @@ -14382,7 +14382,7 @@ export interface Locator { * multiple elements match the locator, throws. * @param options */ - elementHandle(options?: { timeout?: number }): Promise>; + elementHandle(options?: { timeout?: number, signal?: AbortSignal }): Promise>; /** * Highlight the corresponding element(s) on the screen. Useful for debugging, don't commit the code that uses * [locator.highlight([options])](https://playwright.dev/docs/api/class-locator#locator-highlight). diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts index 2acee94c525e7..b14199edc3f72 100644 --- a/packages/playwright-core/types/types.d.ts +++ b/packages/playwright-core/types/types.d.ts @@ -14382,7 +14382,7 @@ export interface Locator { * multiple elements match the locator, throws. * @param options */ - elementHandle(options?: { timeout?: number }): Promise>; + elementHandle(options?: { timeout?: number, signal?: AbortSignal }): Promise>; /** * Highlight the corresponding element(s) on the screen. Useful for debugging, don't commit the code that uses * [locator.highlight([options])](https://playwright.dev/docs/api/class-locator#locator-highlight). diff --git a/utils/generate_types/overrides.d.ts b/utils/generate_types/overrides.d.ts index a329924e5ad0f..62a22315672f7 100644 --- a/utils/generate_types/overrides.d.ts +++ b/utils/generate_types/overrides.d.ts @@ -198,7 +198,7 @@ export interface Locator { evaluateHandle(pageFunction: PageFunctionOn, arg?: Arg, options?: { timeout?: number, signal?: AbortSignal, exposeFunctions?: boolean }): Promise>; evaluateAll(pageFunction: PageFunctionOn, arg?: Arg): Promise; waitForFunction(pageFunction: PageFunctionOn, arg?: Arg, options?: { timeout?: number, signal?: AbortSignal }): Promise; - elementHandle(options?: { timeout?: number }): Promise>; + elementHandle(options?: { timeout?: number, signal?: AbortSignal }): Promise>; highlight(options?: { style?: string | { [key: string]: string | number } }): Promise; toString(): string; }