Last active
August 23, 2018 14:14
-
-
Save posaunehm/b68b10e9340c3b693617278409bf3ace to your computer and use it in GitHub Desktop.
Puppeteer recorder demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require('puppeteer'); | |
(async () => { | |
const browser = await puppeteer.launch() | |
const page = await browser.newPage() | |
const navigationPromise = page.waitForNavigation() | |
await page.setViewport({ width: 1920, height: 1103 }) | |
await page.goto('https://www.yahoo.co.jp/') | |
await page.click('form > #srchfield > #srchbd > p > #srchbtn') | |
await navigationPromise | |
await page.click('#WS2m > .w:nth-child(1) > .hd > h3 > a') | |
await navigationPromise | |
await page.click('.js-repo-meta-container > .js-repo-meta-edit > .col-11 > span > a') | |
await navigationPromise | |
await browser.close() | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment