Last active
March 31, 2023 14:36
-
-
Save asumansenol/07385c09a1980d320ce6814567480178 to your computer and use it in GitHub Desktop.
scroll_test
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({ | |
headless: false | |
}); | |
const page = await browser.newPage(); | |
await page.goto('https://www.wired.com'); | |
await page.setViewport({ | |
width: 1200, | |
height: 800 | |
}); | |
await page.evaluate(() => { | |
document.querySelector('.nav-worker_threads').scrollIntoView(); | |
}); | |
await page.focus('#email'); | |
await page.keyboard.type('test54') | |
await page.waitForTimeout(40000) | |
await browser.close(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment