Skip to content

Instantly share code, notes, and snippets.

@cgoldberg
Last active November 3, 2020 15:23
Show Gist options
  • Select an option

  • Save cgoldberg/e6e2a1ef3535f8d614462cc42c935f33 to your computer and use it in GitHub Desktop.

Select an option

Save cgoldberg/e6e2a1ef3535f8d614462cc42c935f33 to your computer and use it in GitHub Desktop.
Python - Selenium WebDriver - Installing an unpacked Chrome Extension
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)
@audas

audas commented Feb 16, 2020

Copy link
Copy Markdown

Throws a warning popup window which can not be dismissed.

@ruthvikchandravanam

Copy link
Copy Markdown

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.

@audas

audas commented Jun 11, 2020

Copy link
Copy Markdown

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.

@audas

audas commented Jun 12, 2020

Copy link
Copy Markdown

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