Unable to load unpacked extension into chrome using Selenium webdriver
I am new to using web driver but I have followed what was mentioned here (How can I launch Chrome with an unpacked extension?) and all that I could get from other web search.
I am trying to test an extension for chrome which I have developed but I haven’t been able to figure out how to start chrome with extension loaded on it. Here is what I have till now and I would appreciate if someone could tell me the issue with the code (I was successful in launching Chrome using webdriver):
import time
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
browser = webdriver.Chrome() browser.get('http://seleniumhq.org/')
ChromeOptions options = new ChromeOptions();
options.addArguments("load-extension=C:UsersmaveDesktopBrowser_Extension_Featureextension_v5");
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
ChromeDriver driver = new ChromeDriver(capabilities);
time.sleep(15)
browser.quit()
Read more here: Source link