Blog

Failed to load extension pop up throws while running selenium scripts in chrome

Why this error message “Failed to load extension from:” is occurring while executing selenium script in chrome browser?

Selenium chrome driver uses Chrome automation extension where as your admin(company) is blocking extensions

This was also reported as an issue here

https://bugs.chromium.org/p/chromedriver/issues/detail?id=639#c36

There are two options to fix this issue:

1. Ask your admin to allow chrome automation extensions

2. Fix this by automation selenium code

How to fix this issue using java/selenium code?

 

options.setExperimentalOption("useAutomationExtension", false);

Full working java code with selenium chrome driver:

public WebDriver openChrome()
{
System.setProperty("webdriver.chrome.driver", "chromedriver.exe");
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("useAutomationExtension", false);
return driver = new ChromeDriver(options);

}

IT Whistle- A place to learn technologies for free

Leave a Reply

Your email address will not be published. Required fields are marked *