"Page.navigate" has to allow navigation by frameId
Categories
(Remote Protocol :: CDP, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: whimboo, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [puppeteer-beta2-mvp])
Right now navigation is only supported for the top-level frame. But Puppeteer also allows to navigate a very specific frame as specified via frameId
to Page.navigate()
.
Here the example from juggler in how it could work:
https://github.com/puppeteer/juggler/blob/master/testing/juggler/content/PageAgent.js#L264-L271
Reporter | ||
Comment 1•4 years ago
|
||
While working on bug 1637640 I noticed that some Puppeteer tests try to navigate a specific frame. Also some users of Puppeteer want to have this feature. I doubt it will be too hard to implement, so I will have a look at.
Reporter | ||
Comment 2•4 years ago
|
||
As it turned out to make this feature work with Puppeteer we would have to send the loaderId
for attached frames within their init
lifecycle event. While I thought this works with my patch for bug 1637640, it actually sends undefined
from within _onFrameAttached
. To let the content Page domain know the loaderId
we would have to wait for the first Network request for this particular frame. Sadly this event is sent out after some other page events have already sent out, so we would mix up the ordering.
I think that we need some refactoring here, so that we can define a loaderId
for new frames (including the main frame) when they are created. That id should then be used by the Network domain for each and every request. Sadly we can't intercept network requests yet.
Another option would be a channelId to loaderId map.
This is too much work for right now, so I step back from this bug for the moment.
Assignee | ||
Updated•4 years ago
|
Updated•2 years ago
|
Description
•