I am trying to use the following simple piece of code to open a new session of Chrome with an extension on:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_extension(r'C:\\Users\\username\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Extensions\\iggpfpnahkgpnindfkdncknoldgnccdg\\5.17.1_0.crx')
driver = webdriver.Chrome(options=chrome_options)
driver.get("http://stackoverflow.com")
I get the error:
raise IOError("Path to the extension doesn't exist") OSError: Path to the extension doesn't exist
I believe I don't understand how to link to the path of an extension. Where is the .crx file? Do I have to zip the directory?