The following code prints "success" to console
puppeteer = require("puppeteer");
(async () => {
const browser = await puppeteer.launch({
product: "firefox",
headless: false
});
const page = await browser.newPage();
await page.goto("https://google.com/");
console.log('success');
await browser.close();
})();
Changed the site from 'google' to 'twitter'. The following code results in TimeoutError: Navigation timeout of 30000 ms exceeded
const puppeteer = require("puppeteer");
(async () => {
const browser = await puppeteer.launch({
product: "firefox",
headless: false
});
const page = await browser.newPage();
await page.goto("https://twitter.com/");
console.log('success');
await browser.close();
})();
Aucun commentaire:
Enregistrer un commentaire