Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix(events): deliver page.close upon disconnect in FF (#929)

Pavel Feldman8a35f4023c14
diff --git a/src/browserContext.ts b/src/browserContext.ts
index 60326d94e3..6d8f56c535 100644
--- a/src/browserContext.ts
+++ b/src/browserContext.ts
@@ -127,6 +127,8 @@ export class BrowserContext extends platform.EventEmitter {
_browserClosed() {
this._closed = true;
+ for (const page of this._delegate.existingPages())
+ page._didClose();
this.emit(Events.BrowserContext.Close);
}
}