环境:
Selenium webdriver,TestNG,Maven
运行脚本时出现此错误:
org.openqa.selenium.WebDriverException:未知错误:缺失或 无效的'entry.level'(会话信息:chrome = 63.0.3239.132)(驱动程序 信息:chromedriver = 2.29.461591 (62ebf098771772160f391d75e589dc567915b233),platform = Windows NT 6.3.9600 x86_64)(警告:服务器未提供任何堆栈跟踪信息)命令持续时间或超时:0毫秒构建信息: 版本:'3.9.1',修订版:'63f7b50',时间: '2018-02-07T22:25:02.294Z'系统信息:主机:'OWNER',ip:'1x6.1x8.1.1x4',os.name:'Windows 8.1',os.arch:'amd64',os 。版: '6.3',java.version:'1.8.0_131'驱动程序信息: org.openqa.selenium.chrome.ChromeDriverGoogle运行在我的Chrome上 机器版本63.0.3239.132(官方构建)(64位)Java版本: 9.0.4
依赖关系:
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.9.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.opencsv/opencsv -->
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>3.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>3.9.1</version>
</dependency>
</dependencies>
请告知我该如何解决错误?
答案 0 :(得分:0)
您只需要更改
即可chromedriver=2.29.461591
到最新的Chrome驱动程序。