how to get the Page instance?
See original GitHub issue...
var page = await browser.targets()[0].page();
...
when I ran the code, I got:
$ node app.js
(node:7716) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejec
tion id: 1): Error: Protocol error (Page.getFrameTree): 'Page.getFrameTree' wasn
't found undefined
(node:7716) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre
cated. In the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.
My environment:
- Puppeteer 0.13.0
- Node V8.1.1
- Window 7 64bit
I tried to use Targets
to instead of , but still no work.
I wonder that this kind of functions still can’t to use for now, right?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Access current instance of Page from a static class
You can use HttpContext.CurrentHandler to return the current HttpHandler for the request. A Page class is simply ...
Read more >How to get an instance of a page when you navigate to it in UWP
<summary> · Navigates to a page and returns the instance of the page if it succeeded, · otherwise returns null. · </summary> ·...
Read more >How to get the instance of current page on elsewhere in project
To get your application's current working page instance from elsewhere in your project, you can use the currentRouter object from the Router. import...
Read more >Solved: Display the current URL of my servicenow instance
Display the current URL of my servicenow instance from an ui page. Go to solution.
Read more >Amazon EC2 Reserved Instances
There are five ways to pay for Amazon EC2 instances: On-Demand, ... To learn how to buy an RI, visit the Amazon EC2...
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 FreeTop 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
Top GitHub Comments
just checked… Puppeteer 0.13.0 requires a Chromium version that is equivalent to Chrome
64.0.3265.0
.And here’s how to get a chrome version if you have a chromium revision number or a git sha:
chromium_revision
in the puppeteer package.jsonr
)@ebidel Arrived here from seeing this error and doing a bit of testing. It appears that puppeteer using
Page.getFrameTree
is a little problematic in some cases (I think it’s only available in Canary), so beta or stable builds of chrome will not work with puppeteer at this point in time.