Есть отличная удаленная работа для php+codeception+jenkins+allure+docker спецов. 100% remote! Присоединиться к проекту

Exception когда береться скриншот с Chrome Driver

screenshot
Теги: #<Tag:0x00007f7b6d111940>

(Taras) #1

Все работало нормально, и в один момент (после обновления до 45 версии селениума, апдейта хрома и запуска ccleaner-а на машине(может тоже повлияло - не знаю)) - у меня не беруться скриншоти в тестах:

WebDriver Exception throwed:</b>&nbspunknown 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.76)
  (Driver info: chromedriver=2.14.313457 (3d645c400edf2e2c500566c9aa096063e707c9cf),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 10.10 seconds
Build info: version: '2.45.0', revision: '5017cb8e7ca8e37638dc3091b2440b90a1d8686f', time: '2015-02-27 09:10:26'
System info: host: 'Taras-PC', ip: '192.168.1.222', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_67'
Session ID: 822585cf3b6f6f2763382d2377614430
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=XP, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={userDataDir=C:\Users\Taras\AppData\Local\Temp\scoped_dir3844_6325}, rotatable=false, locationContextEnabled=true, mobileEmulationEnabled=false, version=41.0.2272.76, takesHeapSnapshot=true, cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, webStorageEnabled=true, nativeEvents=true, applicationCacheEnabled=false, takesScreenshot=true}]<p>
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=41.0.2272.76)
  (Driver info: chromedriver=2.14.313457 (3d645c400edf2e2c500566c9aa096063e707c9cf),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 10.10 seconds
Build info: version: '2.45.0', revision: '5017cb8e7ca8e37638dc3091b2440b90a1d8686f', time: '2015-02-27 09:10:26'
System info: host: 'Taras-PC', ip: '192.168.1.222', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_67'
Session ID: 822585cf3b6f6f2763382d2377614430
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=XP, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={userDataDir=C:\Users\Taras\AppData\Local\Temp\scoped_dir3844_6325}, rotatable=false, locationContextEnabled=true, mobileEmulationEnabled=false, version=41.0.2272.76, takesHeapSnapshot=true, cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, webStorageEnabled=true, nativeEvents=true, applicationCacheEnabled=false, takesScreenshot=true}]
	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:204)
	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:622)
	at org.openqa.selenium.remote.RemoteWebDriver.getScreenshotAs(RemoteWebDriver.java:324)
	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.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:101)
	at com.sun.proxy.$Proxy9.getScreenshotAs(Unknown Source)
	at org.openqa.selenium.support.events.EventFiringWebDriver.getScreenshotAs(EventFiringWebDriver.java:266)
	at framework.utility.TestExecutionListener.takeScreenshot(TestExecutionListener.java:82)
	at framework.utility.TestExecutionListener.printTestResults(TestExecutionListener.java:55)
	at framework.utility.TestExecutionListener.onTestSuccess(TestExecutionListener.java:63)
	at org.testng.internal.Invoker.runTestListeners(Invoker.java:1899)
	at org.testng.internal.Invoker.runTestListeners(Invoker.java:1879)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:778)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
	at org.testng.TestRunner.privateRun(TestRunner.java:767)
	at org.testng.TestRunner.run(TestRunner.java:617)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
	at org.testng.SuiteRunner.run(SuiteRunner.java:240)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
	at org.testng.TestNG.run(TestNG.java:1057)
	at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
[Invoker 700985002] Invoking @AfterMethod TestBase.tearDown()[pri:0, instance:framework.logintests.LoginPageTestSuite@5bbeffcd]

(Stan) #2

Случайно не incognito mode?

Хотя вопрос отпадает, не нашел его в стектрейсе. Если не падает на 44, ищи баг репорты или добавляй новый.


(Stan) #3

Хотя я догадался в чем может быть проблема, погуглил про ccleaner, он запрещает unpacked extensions в хромесли. Проверь и включи обратно :slight_smile:


(Taras) #4

переустановка хрома и чистка AppData помогла)