Last active
November 3, 2020 15:23
-
-
Save cgoldberg/e6e2a1ef3535f8d614462cc42c935f33 to your computer and use it in GitHub Desktop.
Python - Selenium WebDriver - Installing an unpacked Chrome Extension
This file contains 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
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
unpacked_extension_path = '/path/to/unpacked/extension/' | |
options = Options() | |
options.add_argument('--load-extension={}'.format(unpacked_extension_path)) | |
driver = webdriver.Chrome(options=options) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
from selenium.common.exceptions import WebDriverException
chrome_options = webdriver.ChromeOptions()
driver = webdriver.Chrome(options=chrome_options,executable_path='/usr/lib/chromium-browser/chromedriver')