From 1fa3b78cebaabfd409ac5b9dfc18e4f4b4d68503 Mon Sep 17 00:00:00 2001 From: Chris Pawlukiewicz Date: Thu, 2 Nov 2017 15:52:39 -0600 Subject: [PATCH] fixed the types for pupeteer-elementhandle-type --- types/puppeteer/index.d.ts | 2 +- types/puppeteer/puppeteer-tests.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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();