diff --git a/types/puppeteer/index.d.ts b/types/puppeteer/index.d.ts index 12af2a6eeb..151f69d70f 100644 --- a/types/puppeteer/index.d.ts +++ b/types/puppeteer/index.d.ts @@ -191,7 +191,7 @@ export interface ElementHandle extends JSHandle { screenshot(options?: ScreenshotOptions): Promise; tap(): Promise; toString(): string; - type(selector: string, text: string, options?: { delay: number }): Promise; + type(text: string, options?: { delay: number }): Promise; uploadFile(...filePaths: string[]): Promise; } diff --git a/types/puppeteer/puppeteer-tests.ts b/types/puppeteer/puppeteer-tests.ts index 403c3ac7ac..9d76178a62 100644 --- a/types/puppeteer/puppeteer-tests.ts +++ b/types/puppeteer/puppeteer-tests.ts @@ -208,7 +208,7 @@ puppeteer.launch().then(async browser => { } }); console.log(button.toString()); - div.type("input", "Hello World", { delay: 10 }); + input.type("Hello World", { delay: 10 }); const buttonText = await (await button.getProperty('textContent')).jsonValue();