Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
fix(screencast): dont throw from frameAck if target is closed (#3702)
Yury Semikhatskydb9b8a003ff9
diff --git a/src/server/chromium/crPage.ts b/src/server/chromium/crPage.tsindex 6573d0e611..cb130c4419 100644--- a/src/server/chromium/crPage.ts+++ b/src/server/chromium/crPage.ts@@ -743,7 +743,8 @@ class FrameSession {return;const buffer = Buffer.from(payload.data, 'base64');this._videoRecorder.writeFrame(buffer, payload.metadata.timestamp!);- this._client.send('Page.screencastFrameAck', {sessionId: payload.sessionId});+ // The target may be closed before receiving the ack.+ this._client.send('Page.screencastFrameAck', {sessionId: payload.sessionId}).catch(() => {});}async _startScreencast(screencastId: string, options: types.PageScreencastOptions): Promise<void> {diff --git a/test/screencast.spec.ts b/test/screencast.spec.tsindex b9a095d0ce..dfe4da5501 100644--- a/test/screencast.spec.ts+++ b/test/screencast.spec.ts@@ -193,8 +193,7 @@ describe('screencast', suite => {it('should capture navigation', test => {test.flaky(options.CHROMIUM && MAC);- test.flaky(options.FIREFOX && LINUX && !options.HEADLESS);- test.flaky(options.FIREFOX && WIN);+ test.flaky(options.FIREFOX);test.flaky(options.WEBKIT);}, async ({page, tmpDir, server, videoPlayer, toImpl}) => {const videoFile = path.join(tmpDir, 'v.webm');