我是 Serenity Bdd 框架的新手;我克隆了这个仓库:https ://github.com/serenity-bdd/serenity-screenplay-train-demo
Os: Ubuntu: 17.04
Intellij IDEA Community 2017.3
Pom.xml: https://github.com/serenity-bdd/serenity-screenplay-train-demo/blob/master/pom.xml
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-core</artifactId>
<version>${serenity.version}</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-screenplay</artifactId>
<version>${serenity.version}</version>
</dependency>
我正在尝试运行自动化测试,但遇到了错误:
net.thucydides.core.webdriver.UnsupportedDriverException:
Could not instantiate class org.openqa.selenium.chrome.ChromeDriver
.
.
.
Caused by: net.thucydides.core.webdriver.UnsupportedDriverException: Could
not instantiate new WebDriver instance of type class
org.openqa.selenium.chrome.ChromeDriver (The path to the chromedriver driver
executable must be set by the webdriver.chrome.driver system property; for
more information, see
https://sites.google.com/a/chromium.org/chromedriver/downloads. The latest
version can be downloaded from
https://sites.google.com/a/chromium.org/chromedriver/downloads
.
.
.
.
Caused by: java.lang.IllegalStateException: The path to the chromedriver
driver executable must be set by the webdriver.chrome.driver system
property; for more information, see
https://sites.google.com/a/chromium.org/chromedriver/downloads. The latest
version can be downloaded from
https://sites.google.com/a/chromium.org/chromedriver/downloads
我知道我缺少一些罐子或库,但不知道如何添加它们或添加什么。我猜我应该更新 maven pom.xml 以添加缺少的依赖项?
更新:
原来pom.xml
是指向旧的库版本,所以我更新了它们,现在得到了这个新错误:
错误 ntcore.webdriver.WebDriverFacade - 无法创建新的 WEBDRIVER_DRIVER 实例类 org.openqa.selenium.chrome.ChromeDriver:无法实例化类型为 org.openqa.selenium.chrome.ChromeDriver 的新 WebDriver 实例(chromedriver 驱动程序可执行文件的路径必须由 webdriver.chrome.driver 系统属性设置;有关更多信息,请参阅 https://sites.google.com/a/chromium.org/chromedriver/downloads。最新版本可以从 https://sites下载.google.com/a/chromium.org/chromedriver/downloads