Skip to content

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

fix(test): follow up to the lock test failure (#39379)

Pavel Feldman1aa97fee0a62
diff --git a/packages/playwright/src/mcp/browser/browserContextFactory.ts b/packages/playwright/src/mcp/browser/browserContextFactory.ts
index 9beb6a87dd..55de3e0b6b 100644
--- a/packages/playwright/src/mcp/browser/browserContextFactory.ts
+++ b/packages/playwright/src/mcp/browser/browserContextFactory.ts
@@ -203,7 +203,7 @@ class PersistentContextFactory implements BrowserContextFactory {
await startTraceServer(this.config, tracesDir);
if (await isProfileLocked5Times(userDataDir))
- throw new Error(`User data directory ${userDataDir} is already in use by another browser process. Use --isolated to run multiple instances of the same browser.`);
+ throw new Error(`Browser is already in use for ${userDataDir}, use --isolated to run multiple instances of the same browser`);
testDebug('lock user data dir', userDataDir);