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 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
| 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) |
https://launchpad.net/~canonical-chromium-builds/+archive/ubuntu/stage/+build/14482955
Cant remember - does that help ?
Once you move the .deb file over to raspberry pi - double click on it and it will self install.
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')
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would you tell me where i can find unpacked extensions? I was trying with packed extensions hola vpn crx, but it is not working? If you know how this can work, please guide me, Thank you.