-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Version
1.55.0
Steps to reproduce
I have updated Chrome to the latest version, and when running Playwright with the latest binary path, I can not load extensions, and without the executable_path arg for using the Chromium bundle, it works normally
with sync_playwright() as p:
# Persistent context requires launching the browser with user_data_dir
# Extensions only work with Chromium
user_data_dir = Path(USER_DATA_DIR).absolute()
extension_path = Path(EXTENSION_PATH).absolute()
browser_context = p.chromium.launch_persistent_context(
user_data_dir,
headless=False, # Extensions won't load in headless mode
args=[
f"--disable-extensions-except={extension_path}",
f"--load-extension={extension_path}",
],
executable_path="/usr/bin/google-chrome-stable"
)
page = browser_context.new_page()
page.goto("https://example.com")
print("Browser opened with extension loaded and persistent profile.")
input("Press Enter to close...")
browser_context.close()
Expected behavior
.
Actual behavior
.
Additional context
No response
Environment
- Operating System: [Ubuntu 22.04]
- Browser: [Chromium] Version 140.0.7339.80 (Official Build) (64-bit)
- Python Version: [3.12]
- Other info:
Metadata
Metadata
Assignees
Labels
No labels