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
test: rebaseline page-event-crash test (#15817)
Dmitry Gozmanf22d611ec5af
diff --git a/tests/page/page-event-crash.spec.ts b/tests/page/page-event-crash.spec.tsindex 5b64adb525..9aea198b4a 100644--- a/tests/page/page-event-crash.spec.ts+++ b/tests/page/page-event-crash.spec.ts@@ -45,7 +45,11 @@ it.describe('', () => {await page.waitForEvent('crash');const err = await page.evaluate(() => {}).then(() => null, e => e);expect(err).toBeTruthy();- expect(err.message).toContain('Target crashed');+ // In Firefox, crashed page is sometimes "closed".+ if (browserName === 'firefox')+ expect(err.message.includes('Target page, context or browser has been closed') || err.message.includes('Target crashed'), err.message).toBe(true);+ else+ expect(err.message).toContain('Target crashed');});it('should cancel waitForEvent when page crashes', async ({ page, toImpl, browserName, platform, mode }) => {