小编典典

org.openqa.selenium.WebDriverException:未知错误:无法获取自动化扩展

selenium

Chrome Driver is not able to maximize the window :
ChromeDriver Version:2.24.417431
Chrome Version :57.0.2987.110
    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.110)
      (Driver info: chromedriver=2.24.417431 (9aea000394714d2fbb20850021f6204f2256b9cf),platform=Windows NT 6.3.9600 x86_64) (WARNING: The server did not provide any stacktrace information)
    Command duration or timeout: 10.02 seconds
    Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
    System info: host: 'JMP-CPE-MSDC01', ip: '169.254.133.0', os.name: 'Windows Server 2012 R2', os.arch: 'x86', os.version: '6.3', 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.24.417431 (9aea000394714d2fbb20850021f6204f2256b9cf), userDataDir=D:\TempFiles\scoped_dir31332_1125}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=57.0.2987.110, platform=WIN8_1, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
    Session ID: 048637a3378f2564ab12cb3eb3d2837b
        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:206)
        at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:701)
        at org.openqa.selenium.remote.RemoteWebDriver.getScreenshotAs(RemoteWebDriver.java:335)
        at com.automate.SeleniumWrapper.GenUtils.getSnapShot(GenUtils.java:33)
        at com.automate.SeleniumWrapper.stepExecutor.StepDriver(stepExecutor.java:4795)
        at com.automate.testSuite.Shadow.ShadowScenario.ReEncryption443734(ShadowScenario.java:607)
        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:100)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:646)
        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:811)
        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1137)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
        at org.testng.TestRunner.privateRun(TestRunner.java:753)
        at org.testng.TestRunner.run(TestRunner.java:607)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:368)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:363)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:321)
        at org.testng.SuiteRunner.run(SuiteRunner.java:270)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1284)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1209)
        at org.testng.TestNG.runSuites(TestNG.java:1124)
        at org.testng.TestNG.run(TestNG.java:1096)
        at com.automate.Run.DTVProjectRun.main(DTVProjectRun.java:41)
 }

阅读 961

收藏
2020-06-26

共1个答案

小编典典

您需要升级Chromedriver版本,因为您使用的版本不支持您使用的Chrome版本。

最新版本可在此处下载:

https://sites.google.com/a/chromium.org/chromedriver/downloads

2020-06-26