Skip to content

Commit 35b63a8

Browse files
authored
fix: support empty string as persistent context path (#1416)
1 parent c8d8f4a commit 35b63a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

playwright/_impl/_browser_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ async def launch_persistent_context(
146146
recordHarMode: HarMode = None,
147147
recordHarContent: HarContentPolicy = None,
148148
) -> BrowserContext:
149-
userDataDir = str(Path(userDataDir))
149+
userDataDir = str(Path(userDataDir)) if userDataDir else ""
150150
params = locals_to_params(locals())
151151
await normalize_context_params(self._connection._is_sync, params)
152152
normalize_launch_params(params)

0 commit comments

Comments
 (0)