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
docs: clarify that userDataDir cannot be used concurrently (#35228)
Dmitry Gozmanaccd7c6c9e5a
diff --git a/docs/src/api/class-browsertype.md b/docs/src/api/class-browsertype.mdindex 8ab2e63f8b..f970d4aef3 100644--- a/docs/src/api/class-browsertype.md+++ b/docs/src/api/class-browsertype.md@@ -324,11 +324,13 @@ this context will automatically close the browser.* since: v1.8- `userDataDir` <[path]>-Path to a User Data Directory, which stores browser session data like cookies and local storage. More details for+Path to a User Data Directory, which stores browser session data like cookies and local storage. Pass an empty string to create a temporary directory.++More details for[Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and-[Firefox](https://wiki.mozilla.org/Firefox/CommandLineOptions#User_profile).-Note that Chromium's user data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`. Pass an empty string to-use a temporary directory instead.+[Firefox](https://wiki.mozilla.org/Firefox/CommandLineOptions#User_profile). Chromium's user data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`.++Note that browsers do not allow launching multiple instances with the same User Data Directory.### option: BrowserType.launchPersistentContext.-inline- = %%-shared-browser-options-list-v1.8-%%* since: v1.8diff --git a/packages/playwright-client/types/types.d.ts b/packages/playwright-client/types/types.d.tsindex 1573308b56..da5df0f346 100644--- a/packages/playwright-client/types/types.d.ts+++ b/packages/playwright-client/types/types.d.ts@@ -14710,11 +14710,15 @@ export interface BrowserType<Unused = {}> {* Launches browser that uses persistent storage located at* [`userDataDir`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-user-data-dir)* and returns the only context. Closing this context will automatically close the browser.- * @param userDataDir Path to a User Data Directory, which stores browser session data like cookies and local storage. More details for+ * @param userDataDir Path to a User Data Directory, which stores browser session data like cookies and local storage. Pass an empty+ * string to create a temporary directory.+ *+ * More details for* [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and- * [Firefox](https://wiki.mozilla.org/Firefox/CommandLineOptions#User_profile). Note that Chromium's user data- * directory is the **parent** directory of the "Profile Path" seen at `chrome://version`. Pass an empty string to use- * a temporary directory instead.+ * [Firefox](https://wiki.mozilla.org/Firefox/CommandLineOptions#User_profile). Chromium's user data directory is the+ * **parent** directory of the "Profile Path" seen at `chrome://version`.+ *+ * Note that browsers do not allow launching multiple instances with the same User Data Directory.* @param options*/launchPersistentContext(userDataDir: string, options?: {diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.tsindex 1573308b56..da5df0f346 100644--- a/packages/playwright-core/types/types.d.ts+++ b/packages/playwright-core/types/types.d.ts@@ -14710,11 +14710,15 @@ export interface BrowserType<Unused = {}> {* Launches browser that uses persistent storage located at* [`userDataDir`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-user-data-dir)* and returns the only context. Closing this context will automatically close the browser.- * @param userDataDir Path to a User Data Directory, which stores browser session data like cookies and local storage. More details for+ * @param userDataDir Path to a User Data Directory, which stores browser session data like cookies and local storage. Pass an empty+ * string to create a temporary directory.+ *+ * More details for* [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and- * [Firefox](https://wiki.mozilla.org/Firefox/CommandLineOptions#User_profile). Note that Chromium's user data- * directory is the **parent** directory of the "Profile Path" seen at `chrome://version`. Pass an empty string to use- * a temporary directory instead.+ * [Firefox](https://wiki.mozilla.org/Firefox/CommandLineOptions#User_profile). Chromium's user data directory is the+ * **parent** directory of the "Profile Path" seen at `chrome://version`.+ *+ * Note that browsers do not allow launching multiple instances with the same User Data Directory.* @param options*/launchPersistentContext(userDataDir: string, options?: {