[BUG] browser has no newPage method
See original GitHub issueContext:
- Playwright Version: 0.10
- Operating System: Linux
Code Snippet
This snippet:
import playwright from "playwright";
(async () => {
const browser = await playwright.chromium.launch();
const page = await browser.newPage("http://whatsmyuseragent.org/");
await page.screenshot({ path: `example-chromium.png` });
await browser.close();
})();
gives me this Typescript error:
Property 'newPage' does not exist on type 'CRBrowser'
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Puppeteer: browser.newPage is not a function - Stack Overflow
Someone on Guilded helped me resolve this with a pretty simple fix. Basically both the puppeteer.launch({}); and browser.newPage(); return a ...
Read more >Web Scraping with a Headless Browser: A Puppeteer Tutorial
First, we launch a new headless browser instance, then we open a new page (tab) and navigate to the URL provided in the...
Read more >Browser.newPage() method - Puppeteer
Promise which resolves to a new Page object. The Page is created in a default browser context. Signature:. class Browser ...
Read more >473481 - page-break-before/page-break-after fails to force ...
Add OK or FAIL after other browsers where you have tested this issue: ... CSS Working Group, no current way to force a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In this case, you should update the examples on the home README
I don’t remember precisely but I know that
waitForSelector
was not working with Puppeteer on headless mode (it was waiting indefenitely). I tried with Playwright and it was working fine with webkit for example.