M
M
Maksimg0lubev2021-06-28 22:43:58
JavaScript
Maksimg0lubev, 2021-06-28 22:43:58

Why does puppeteer open the about;blank window instead of the correct page?

When I try to parse the page I need and run puppeteer.js, the about;blank window opens instead of the desired url.
What could be causing this and how can it be fixed?

const browser = await puppeteer.launch({headless: false});
  const page = await browser.newPage();
  await page.goto('https://google.com');
  await page.setViewport({width: 1000, height: 500})
  await page.screenshot({path: 'google.png'});

  await browser.close();

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question