Skip to content

Instantly share code, notes, and snippets.

@asumansenol
Last active March 31, 2023 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asumansenol/07385c09a1980d320ce6814567480178 to your computer and use it in GitHub Desktop.
Save asumansenol/07385c09a1980d320ce6814567480178 to your computer and use it in GitHub Desktop.
scroll_test
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