chore(autowait): auto-wait for top level navigations only (#5861)

This commit is contained in:
Pavel Feldman 2021-03-18 05:47:51 +08:00 committed by GitHub
parent 5ae731a3fb
commit 84efdfcbc9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1243,6 +1243,9 @@ class SignalBarrier {
}
async addFrameNavigation(frame: Frame) {
// Auto-wait top-level navigations only.
if (frame.parentFrame())
return;
this.retain();
const waiter = helper.waitForEvent(null, frame, Frame.Events.Navigation, (e: NavigationEvent) => {
if (!e.error && this._progress)