-
Notifications
You must be signed in to change notification settings - Fork 135
Description
Description
The --profile flag has confusing behavior when trying to use specific Chrome profiles (like Profile 2). The help text says "store profile in specified directory," which suggests you can point it at a specific profile folder, but it actually expects a Chrome User Data Directory (the parent folder containing all profiles) and always uses the Default profile within it.
Steps to Reproduce
-
Run the following command pointing to a specific Chrome profile:
playwright-cli -s test open https://example.com --profile=/home/user/.config/google-chrome/Default --headed -
Observe that Playwright creates a nested
Default/Defaultdirectory instead of using the existingDefaultprofile. -
The correct usage is:
playwright-cli -s test open https://example.com --profile=/home/user/.config/google-chrome --headedThis uses
/home/user/.config/google-chrome/Default(automatically appendingDefault).
Expected Behavior
Either:
-
Option A (Fix documentation): Update the help text to clarify:
--profile use persistent browser profile, specify User Data Directory (parent folder containing profiles, uses Default profile) -
Option B (Fix behavior): Allow users to specify a specific profile directory directly:
playwright-cli --profile=/home/user/.config/google-chrome/Profile\ 2 open https://example.com
Actual Behavior
- When you pass
--profile=/path/to/google-chrome/Default, Playwright treatsDefaultas a User Data Directory and createsDefault/Default - When you pass
--profile=/path/to/google-chrome, it correctly usesgoogle-chrome/Default - There's no way to use non-Default profiles like
Profile 2,Profile 3, etc.
Environment
- OS: Ubuntu 24.04
- playwright-cli version: 0.1.0
- Browser: Chrome, Version 143.0.7499.169 (Official Build) (64-bit)