You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]when using connect_over_cdp, the browser_context.pages returned pages missing child_frames #17656
The sites loads the frames after the navigation, sometimes I see 2 frames, sometimes 3 and sometimes 4. If I add timeout after goto it normally stabilizes at 4 frames regardless of whether it's local browser or CDP connection:
This is working as intended, you should way for a certain condition when the frames stop changing in the page ('load' event doesn't meet this criteria). Feel free to open another issue and link it to this one if you think there is a bug in Playwright, we'll need a reproducible example to act on that.
Target.attachedToTarget is dispatched for OOPIFs, but since we don't have parentFrameId there, we cannot attach a new frame to the frame tree, so we ignore this target.
Fix ideas, upstream in Chromium:
Add parentTargetId and parentFrameId to TargetInfo.
Alternatively, Page.getFullFrameTree to get the full tree from the top-level page target, maybe with events that update it.
Activity
mxschmitt commentedon Sep 27, 2022
I tried to reproduce using the following script, but it was working for me. Could you share more information about the site you are testing against?
Do you navigate using Chromium directly or do you connect with some other CDP client?
zhanbinyy commentedon Sep 28, 2022
my testing site is: https://web.txcs.tmall.com/login
mxschmitt commentedon Sep 28, 2022
I can repro upstream the differences:
With launch() its 3 and with cdp its 0 when navigated manually.
yury-s commentedon Oct 4, 2022
The sites loads the frames after the navigation, sometimes I see 2 frames, sometimes 3 and sometimes 4. If I add timeout after goto it normally stabilizes at 4 frames regardless of whether it's local browser or CDP connection:
This is working as intended, you should way for a certain condition when the frames stop changing in the page ('load' event doesn't meet this criteria). Feel free to open another issue and link it to this one if you think there is a bug in Playwright, we'll need a reproducible example to act on that.
mxschmitt commentedon Oct 4, 2022
I can still repro with the following:
dgozman commentedon Oct 26, 2022
Investigation notes:
Page.getFrameTreedoes not return OOPIFs.Target.attachedToTargetis dispatched for OOPIFs, but since we don't haveparentFrameIdthere, we cannot attach a new frame to the frame tree, so we ignore this target.Fix ideas, upstream in Chromium:
parentTargetIdandparentFrameIdtoTargetInfo.Page.getFullFrameTreeto get the full tree from the top-level page target, maybe with events that update it.pavelfeldman commentedon Jun 30, 2023
dgozman commentedon Aug 13, 2025
Proposed upstream fix: https://chromium-review.googlesource.com/c/chromium/src/+/6842035