18 lines
495 B
JavaScript
18 lines
495 B
JavaScript
const puppeteer = require('puppeteer');
|
|
|
|
(async () => {
|
|
const browser = await puppeteer.launch();
|
|
const page = await browser.newPage();
|
|
|
|
await page.setViewport({width: 1080, height: 1024});
|
|
|
|
await page.goto('https://www.ohlq.com/search-results?query=weller&contenttype=Product');
|
|
|
|
const ageButton = await page.$("button[data-test='ageVerificationButton']");
|
|
await ageButton.click();
|
|
|
|
await page.screenshot({path: 'screenshot.jpg'});
|
|
|
|
await browser.close();
|
|
})();
|