Skip to content

Instantly share code, notes, and snippets.

@cgoldberg
Created October 30, 2025 13:30
Show Gist options
  • Save cgoldberg/c78c7d837986ec0a8e9908f6088c0038 to your computer and use it in GitHub Desktop.
Save cgoldberg/c78c7d837986ec0a8e9908f6088c0038 to your computer and use it in GitHub Desktop.
Python - load a Chrome extension using Selenium BiDi
# 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