mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix(Navigation): wait for lifecycle events for the frame subtree (#1356)
Currently, we wait only for the main frame to reach the desired lifecycle state. This patch starts waiting until all the frames reach the desired lifecycle state. Fixes #1173.
This commit is contained in:
parent
f8d19e79e7
commit
2c8f658815
@ -94,6 +94,10 @@ class NavigatorWatcher {
|
||||
if (!frame._lifecycleEvents.has(event))
|
||||
return false;
|
||||
}
|
||||
for (const child of frame.childFrames()) {
|
||||
if (!checkLifecycle(child, expectedLifecycle))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user