From 04f25d72bca7d2a0a8a021a5f4c91759f96571f2 Mon Sep 17 00:00:00 2001 From: Szymon Marczak <36894700+szmarczak@users.noreply.github.com> Date: Wed, 22 Sep 2021 13:54:10 +0200 Subject: [PATCH 1/6] docs: mention empty string in `userDataDir` https://github.com/microsoft/playwright/blob/c4eb2d4b1e17a0de1cea7220be45545c7c524614/src/server/browserType.ts#L146-L149 --- docs/src/api/class-browsertype.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/api/class-browsertype.md b/docs/src/api/class-browsertype.md index 414ce0323cb81..22a3d272f1f6e 100644 --- a/docs/src/api/class-browsertype.md +++ b/docs/src/api/class-browsertype.md @@ -245,6 +245,7 @@ Path to a User Data Directory, which stores browser session data like cookies an [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#User_Profile). Note that Chromium's user data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`. +Use an empty string to generate and destroy it automatically. ### option: BrowserType.launchPersistentContext.-inline- = %%-shared-browser-options-list-%% ### option: BrowserType.launchPersistentContext.slowMo = %%-browser-option-slowmo-%% From 855ad1edaceef6295484d78b38f282b3bd14686f Mon Sep 17 00:00:00 2001 From: Szymon Marczak <36894700+szmarczak@users.noreply.github.com> Date: Wed, 22 Sep 2021 14:00:04 +0200 Subject: [PATCH 2/6] Update class-browsertype.md --- docs/src/api/class-browsertype.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/api/class-browsertype.md b/docs/src/api/class-browsertype.md index 22a3d272f1f6e..201e10a9dc4c6 100644 --- a/docs/src/api/class-browsertype.md +++ b/docs/src/api/class-browsertype.md @@ -244,8 +244,8 @@ this context will automatically close the browser. Path to a User Data Directory, which stores browser session data like cookies and local storage. More details for [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#User_Profile). -Note that Chromium's user data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`. -Use an empty string to generate and destroy it automatically. +Note that Chromium's user data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`. Use an empty string to +generate and destroy it automatically. ### option: BrowserType.launchPersistentContext.-inline- = %%-shared-browser-options-list-%% ### option: BrowserType.launchPersistentContext.slowMo = %%-browser-option-slowmo-%% From aba204e49a4f890fe99e6a4f750285599c4004d5 Mon Sep 17 00:00:00 2001 From: Szymon Marczak <36894700+szmarczak@users.noreply.github.com> Date: Thu, 23 Sep 2021 01:10:51 +0200 Subject: [PATCH 3/6] Update types.d.ts --- types/types.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/types.d.ts b/types/types.d.ts index 2ec4db13c039f..807d00684451e 100644 --- a/types/types.d.ts +++ b/types/types.d.ts @@ -9656,7 +9656,8 @@ export interface BrowserType { * 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 [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and * [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#User_Profile). Note that Chromium's user - * data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`. + * data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`. Use an empty string to + * generate and destroy it automatically. * @param options */ launchPersistentContext(userDataDir: string, options?: { From fa5c2bc243c2d75ab6bf03d80952e4fa96550207 Mon Sep 17 00:00:00 2001 From: Szymon Marczak <36894700+szmarczak@users.noreply.github.com> Date: Thu, 23 Sep 2021 01:25:13 +0200 Subject: [PATCH 4/6] Update docs/src/api/class-browsertype.md --- docs/src/api/class-browsertype.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/api/class-browsertype.md b/docs/src/api/class-browsertype.md index 201e10a9dc4c6..5b0ca27349bb7 100644 --- a/docs/src/api/class-browsertype.md +++ b/docs/src/api/class-browsertype.md @@ -244,8 +244,8 @@ this context will automatically close the browser. Path to a User Data Directory, which stores browser session data like cookies and local storage. More details for [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#User_Profile). -Note that Chromium's user data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`. Use an empty string to -generate and destroy it automatically. +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. ### option: BrowserType.launchPersistentContext.-inline- = %%-shared-browser-options-list-%% ### option: BrowserType.launchPersistentContext.slowMo = %%-browser-option-slowmo-%% From df4a7dd667d2abe7d889c6aa189695b10d1a32a4 Mon Sep 17 00:00:00 2001 From: Szymon Marczak <36894700+szmarczak@users.noreply.github.com> Date: Thu, 23 Sep 2021 01:25:38 +0200 Subject: [PATCH 5/6] Update types/types.d.ts --- types/types.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/types.d.ts b/types/types.d.ts index 807d00684451e..6795be0054083 100644 --- a/types/types.d.ts +++ b/types/types.d.ts @@ -9656,8 +9656,8 @@ export interface BrowserType { * 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 [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and * [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#User_Profile). Note that Chromium's user - * data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`. Use an empty string to - * generate and destroy it automatically. + * data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`. Pass an empty string to + * use a temporary directory instead. * @param options */ launchPersistentContext(userDataDir: string, options?: { From bdae20131b732792fa4a0a99316595086a1747d9 Mon Sep 17 00:00:00 2001 From: Szymon Marczak <36894700+szmarczak@users.noreply.github.com> Date: Thu, 23 Sep 2021 11:01:22 +0200 Subject: [PATCH 6/6] Update types.d.ts --- types/types.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/types.d.ts b/types/types.d.ts index 6795be0054083..4ff0d1974638e 100644 --- a/types/types.d.ts +++ b/types/types.d.ts @@ -9656,8 +9656,8 @@ export interface BrowserType { * 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 [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and * [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#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. + * data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`. Pass an empty string to use + * a temporary directory instead. * @param options */ launchPersistentContext(userDataDir: string, options?: {