• Selenium WebDriver问题无法打开Chrome浏览器


    Webdriver打开浏览器的时候,无法打开,定位到程序中,抛下面的异常:

    org.openqa.selenium.WebDriverException: unknown error: Chrome version must be >= 29.0.1545.0
      (Driver info: chromedriver=2.6.232923,platform=Windows NT 6.1 x86_64) (WARNING: The server did not provide any stacktrace information)
    Command duration or timeout: 28.11 seconds
    Build info: version: '2.37.0', revision: 'a7c61cb', time: '2013-10-18 17:15:02'
    System info: host: 'zxy-PC', ip: '10.45.28.133', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_41'
    Driver info: driver.version: ChromeDriver
    null
    unknown error: Chrome version must be >= 29.0.1545.0
      (Driver info: chromedriver=2.6.232923,platform=Windows NT 6.1 x86_64) (WARNING: The server did not provide any stacktrace information)
    Command duration or timeout: 28.11 seconds
    {Driver info=driver.version: ChromeDriver}
    [sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method), sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source), sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source), java.lang.reflect.Constructor.newInstance(Unknown Source), org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193), org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145), org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554), org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216), org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:111), org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:115), org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:161), org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:107), com.ztesoft.res.test.chrome.LogInPageChrome.startUp(LogInPageChrome.java:27), sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method), sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source), sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source), java.lang.reflect.Method.invoke(Unknown Source), org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47), org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12), org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44), org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24), org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27), org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271), org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70), org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50), org.junit.runners.ParentRunner$3.run(ParentRunner.java:238), org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63), org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236), org.junit.runners.ParentRunner.access$000(ParentRunner.java:53), org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229), org.junit.runners.ParentRunner.run(ParentRunner.java:309), org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50), org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38), org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467), org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683), org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390), org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)]

    原因分析:是由于Chrome版本过低导致的

    解决办法:重新下一个比 29.0.1545.0版本高的Chrome就可以了

  • 相关阅读:
    Spring Boot 2 实践记录之 Powermock 和 SpringBootTest
    Spring Boot 2 实践记录之 使用 ConfigurationProperties 注解将配置属性匹配至配置类的属性
    Spring Boot 2 实践记录之 使用 Powermock、Mockito 对 UUID 进行 mock 单元测试
    Spring Boot 2 实践记录之 MyBatis 集成的启动时警告信息问题
    Spring Boot 2 实践记录之 条件装配
    Spring Boot 2 实践记录之 组合注解原理
    Spring Boot 2 实践记录之 Redis 及 Session Redis 配置
    Spring Boot 2 实践记录之 MySQL + MyBatis 配置
    ES6 学习笔记之四 对象的扩展
    ES6 学习笔记之三 函数参数默认值
  • 原文地址:https://www.cnblogs.com/CI131204/p/3442096.html
Copyright © 2020-2023  润新知