I have an automation framework developed around Selenium-WebDriver which launches Chrome and navigates to specified URL and performs specified automation. When I commissione
Reason for the exception is chrome failed to load selenium automation extension.
When ever selenium opens chrome browser, selenium loads a chrome extension in chrome browser to work with it from some temp location. If chrome browser failed to load that extension it will throw an exception.
I got the same exception when my organization blocked loading third party extensions in my chrome browser.
Test method
Veolia.BrentGWP.UserStories.Features.BrentGWPFeature._3_EnterDetailsAndSelectAnAddress_John threw exception:
System.InvalidOperationException: unknown error: cannot get automation extension
from unknown error: page could not be found: chrome- extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html
(Session info: chrome=41.0.2272.118)
(Driver info: chromedriver=2.9.248315,platform=Windows NT 6.1 SP1 x86_64)
I am using Selenium with C# and Visual Studio.
I found this problem is chromedriver version cause. My case run ok when i update the chromedriver.
In case someone is still looking for an answer. Here is the matching response for my situation. https://github.com/SeleniumHQ/selenium/issues/3508 This exactly what is happening in my case where, I'm getting it 60-70% of the time when maximize is called
org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.maximize(RemoteWebDriver.java:945)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWindow.maximize(EventFiringWebDriver.java:644)
at org.openqa.selenium.remote.server.handler.MaximizeWindow.call(MaximizeWindow.java:30)
at org.openqa.selenium.remote.server.handler.MaximizeWindow.call(MaximizeWindow.java:1)
In my case, the chrome browser version and chromedriver versions were incompatible. Chrome updated automatically from 56 to 57 and my chromedriver version was 2.27. The 2 issues throwing 'org.openqa.selenium.WebDriverException: unknown error: cannot get automation extension' error (when maximizing the browser and when taking screenshots), where fixed after updating to cromdriver version 2.28.
The issue here is, Selenium-WebDriver is unable to launch the installed 3rd Party Extensions in chrome. I encountered the issue today as well, so instead of re-installing google chrome, I deleted all the extensions I had installed on Chrome. I have a couple of "Add Blocker" extensions installed.
I had this on my Windows 10 (64 bit) PC after upgrading to Selenium 3.3.1. Downloading Chromedriver 2.29 and overwriting the old version worked. See - https://chromedriver.storage.googleapis.com/index.html?path=2.29/