Skip to content Skip to sidebar Skip to footer

Selenium Chromedriver "Failed To Load Extension"

Can anyone point me in the right direction? I'm running Chrome using the following Python code: opts = Options() opts.add_argument('--disable-extensions') self.browser = webdriver

Solution 1:

I run into the same kind of problem and I solved it following the answer to this other question:

What is python's equivalent of useAutomationExtension for selenium?

For me, the necessary part of this answer is to set the chromeOptions capability 'useAutomationExtension' to false. My code looks like:

from selenium import webdriver
capabilities = { 'chromeOptions':  { 'useAutomationExtension': False}}
driver = webdriver.Chrome(desired_capabilities = capabilities)
driver.get('https://www.python.org/')

I'm not sure if the "--disable-extensions" you add as argument is still necessary, but I think you can keep it by changing capabilities in the code above such as:

capabilities = { 'chromeOptions':  { 'useAutomationExtension': False,
                                     'args': ['--disable-extensions'] }
               }

Both works for me and I don't get the error anymore. My settings are a bit different (Chrome v63, ChromeDriver 2.35, Selenium 3.9 and Python 2.7) but I hope it will help you.


Solution 2:

I had the same issue as above. Referencing the below link, the use of ".add_experimental_option('useAutomationExtension', False)" worked for me.

What is python's equivalent of useAutomationExtension for selenium?

Sample Code:

options = webdriver.ChromeOptions()
options.add_experimental_option('useAutomationExtension', False)
driver = webdriver.Chrome(options=options, executable_path=driverPath)

Solution 3:

Here's the solution to your Question:

Add the following ChromeOptions to overcome the error:

ChromeOptions options = new ChromeOptions(); 
options.addArguments("test-type"); 
options.addArguments("start-maximized"); 
options.addArguments("--js-flags=--expose-gc"); 
options.addArguments("--enable-precise-memory-info"); 
options.addArguments("--disable-popup-blocking"); 
options.addArguments("--disable-default-apps"); 
options.addArguments("test-type=browser"); 
options.addArguments("disable-infobars"); 
WebDriver driver = new ChromeDriver(options);`

Apologies as the code is in Java, you have to convert it into Python format.

Let me know if this helps you.


Post a Comment for "Selenium Chromedriver "Failed To Load Extension""