Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const { chromium } = require('playwright-extra');
- chromium.launch({ headless: true }).then(async browser => {
- const page = await browser.newPage()
- // Navigate to target URL
- await page.goto('https://www.example.com');
- // Get page HTML
- const textContent = await page.evaluate(() => document.body.textContent);
- await browser.close()
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement