Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 138192

puppeteer isn't working with my javascript code

$
0
0

I'm trying to test a very simple code but it's not working. It must be doing a very simple mistake but I can't find the problem. The code below runs with no errors but the browse does not open:

const puppeteer = require('puppeteer');

(async () => {

    console.log("1");
    const browser = await puppeteer.launch({ headless: false });

    console.log("2");
    const page = await browser.newPage();

    console.log("3");
    await page.goto('https://google.com/');

    console.log("4");
    await page.waitForSelector('#fakebox-input');

    console.log("5");
    await browser.close;

});

Viewing all articles
Browse latest Browse all 138192

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>