From 067068df7277c1044cdbf3e4bbf4dbc041fb8feb Mon Sep 17 00:00:00 2001 From: "Yury Semikhatskii (from Dev Box)" Date: Tue, 16 Jun 2026 17:42:11 -0700 Subject: [PATCH] test(webkit): update webkit-wsl launch expectations for executablePath webkit-wsl now accepts executablePath (it no longer throws), so an invalid path is rejected with the standard "Failed to launch ... doesn't exist". Reference: https://github.com/microsoft/playwright/issues/37036 --- tests/library/browsertype-launch.spec.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/library/browsertype-launch.spec.ts b/tests/library/browsertype-launch.spec.ts index 8c138782ce77e..6b58d64e20d66 100644 --- a/tests/library/browsertype-launch.spec.ts +++ b/tests/library/browsertype-launch.spec.ts @@ -64,18 +64,15 @@ it('should throw if page argument is passed', async ({ browserType, browserName, it('should reject if launched browser fails immediately', async ({ mode, browserType, asset, channel }) => { const error = await browserType.launch({ executablePath: asset('dummy_bad_browser_executable.js') }).catch(e => e); if (channel === 'webkit-wsl') - expect(error.message).toContain('Cannot specify executablePath when using the \"webkit-wsl\" channel.'); + expect(error.message).toContain('Failed to launch'); else expect(error.message).toMatch(/browserType\.launch(.|\n)*(spawn UNKNOWN|spawn EFTYPE|Browser logs:)/gim); }); -it('should reject if executable path is invalid', async ({ browserType, mode, channel }) => { +it('should reject if executable path is invalid', async ({ browserType, mode }) => { let waitError: Error | undefined; await browserType.launch({ executablePath: 'random-invalid-path' }).catch(e => waitError = e); - if (channel === 'webkit-wsl') - expect(waitError!.message).toContain('Cannot specify executablePath when using the \"webkit-wsl\" channel.'); - else - expect(waitError!.message).toContain('Failed to launch'); + expect(waitError!.message).toContain('Failed to launch'); }); it('should handle timeout', async ({ browserType, mode }) => {