Created
October 30, 2025 13:30
-
-
Save cgoldberg/c78c7d837986ec0a8e9908f6088c0038 to your computer and use it in GitHub Desktop.
Python - load a Chrome extension using Selenium BiDi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # load a Chrome extension using Selenium BiDi | |
| import os | |
| from selenium import webdriver | |
| # using unzipped extension in ./extensions/my-extension/ | |
| path = os.path.join(os.getcwd(), "extensions", "my-extension") | |
| options = webdriver.ChromeOptions() | |
| options.enable_bidi = True | |
| options.enable_webextensions = True | |
| driver = webdriver.Chrome(options=options) | |
| driver.webextension.install(path=path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment