docs(api.md): update ElementHandle example (#4169)

Fix #4150
This commit is contained in:
Andrey Lushnikov 2019-03-19 12:53:47 -07:00 committed by GitHub
parent c6c32491ec
commit 0d0e620405
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2962,9 +2962,9 @@ const puppeteer = require('puppeteer');
puppeteer.launch().then(async browser => {
const page = await browser.newPage();
await page.goto('https://google.com');
const inputElement = await page.$('input[type=submit]');
await inputElement.click();
await page.goto('https://example.com');
const hrefElement = await page.$('a');
await hrefElement.click();
// ...
});
```