-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
microsoft/playwright
#26894Labels
Description
System info
- Playwright Version: v1.35.0
- Operating System: Ubuntu 22.04
- Browser: Chromium
- Other info: Python 3.7.9
Source code
- I provided exact source code that allows reproducing the issue locally.
Link to the GitHub repository with the repro
Test file (self-contained)
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
launch_args = {"args": ['--user-data-dir=/tmp/foo123']}
# This will give error with incorrect Node.js API usage instead of Python API
browser = p.chromium.launch(**launch_args)
Steps
- [Run the test]
Expected
Exception message should provide a hint to the Python API to use:
For example:
playwright._impl._api_types.Error: Pass user_data_dir parameter to <BrowserType>.launch_persistent_context(...)
instead of specifying --user-data-dir argument
Actual
Error Message provides Node.js API usage:
playwright._impl._api_types.Error: Pass userDataDir parameter to browserType.launchPersistentContext(userDataDir, ...)
instead of specifying --user-data-dir argument