Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //..
- chromium.launch({ headless: true }).then(async browser => {
- //..
- // The single line of code to solve reCaptchas
- await page.solveRecaptchas()
- // Click the Check button
- await page.click('text=Check');
- // Wait a few seconds
- await page.waitForTimeout(5000);
- console.log('Taking a screenshot...');
- // Take a screenshot and save to project folder
- await page.screenshot({ path: 'screenshot.png', fullPage: true });
- console.log('Screenshot saved');
- await browser.close();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement