0

I have a little problem. In fact, I am running some automated tests with selenium webdriver. Point is, I am watching my code running. It did all the actions, there is no error. All is good. And when I check in the output. My test is failed. And it shouldn't be failed. And the error is not understandable for me.

The trace is :

org.openqa.selenium.WebDriverException: unknown error: cannot get automation extension
from unknown error: page could not be found: chrome-
extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html
(Session info: chrome=57.0.2987.133)
(Driver info: chromedriver=2.27.440174 (e97a722caafc2d3a8b807ee115bfb307f7d2cfd9),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 10.19 seconds
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
System info: host: 'TOLX300092143', ip: '44.10.75.147', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.27.440174 (e97a722caafc2d3a8b807ee115bfb307f7d2cfd9), userDataDir=C:\Temp\scoped_dir10764_26836}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=57.0.2987.133, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=}]
Session ID: 8541fb20a0b6a0800e45ff6fad8dbb25
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:635)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:658)
at org.openqa.selenium.remote.RemoteWebDriver.getScreenshotAs(RemoteWebDriver.java:340)
at fr.AUTOMATISATION.moteur.MOTEUR_AUTOMATISATION.takeScreenShot(MOTEUR_AUTOMATISATION.java:222)
at fr.AUTOMATISATION.moteur.MOTEUR_AUTOMATISATION.getScreenshot(MOTEUR_AUTOMATISATION.java:210)
at fr.AUTOMATISATION.moteur.MOTEUR_AUTOMATISATION.testCas(MOTEUR_AUTOMATISATION.java:172)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:659)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:845)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1153)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
at org.testng.TestRunner.privateRun(TestRunner.java:771)
at org.testng.TestRunner.run(TestRunner.java:621)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:357)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310)
at org.testng.SuiteRunner.run(SuiteRunner.java:259)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1199)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1124)
at org.testng.TestNG.run(TestNG.java:1032)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:230)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:76)

Do you have an idea ? Because visually, all is good :)

Célia

celianou
  • 207
  • 4
  • 25
  • check out this link http://stackoverflow.com/questions/42944775/org-openqa-selenium-webdriverexception-unknown-error-cannot-get-automation-ext – Avinash Reddy May 09 '17 at 12:56
  • it works !! But, when I run the test, I have a new windows with the following error : "Failed to load extension from : C:\Temp\scored_dir12712_23944\internal. Loading of unpacked extensions is disabled by the administrator." I need to click several time on "OK" to shut the window and after this the test is running perfectly. Do you have an idea ? By the way, you can post your answer and I will validate. – celianou May 09 '17 at 13:44
  • Possible duplicate of [org.openqa.selenium.WebDriverException: unknown error: cannot get automation extension](http://stackoverflow.com/questions/42944775/org-openqa-selenium-webdriverexception-unknown-error-cannot-get-automation-ext) – Bogdan Kobylynskyi May 09 '17 at 13:49

0 Answers0