如何 运行 来自 Maven 原型的 Serenity BDD 简单项目 (serenity.version=2.0.40)
How to run Serenity BDD simple project from maven archetype (serenity.version=2.0.40)
我在 Winodws 7 上使用 Internet Explorer 11 尝试 运行 来自 net.serenity-bdd:serenity-cucumber-archetype 的简单项目
做这件事我有很多陷阱。
尽量避免:
1.
java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/username/Java/git_other/test/test/target/test-classes/features
答:不要使用2.0.42版本。
2.
Caused by: java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.ie.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver. The latest version can be downloaded from http://selenium-release.storage.googleapis.com/index.html
回答:
1.Go 到第 [https://docs.seleniumhq.org/download/][1] 页
下载版本 3.14.0(推荐)32 位 Windows IE 或 64 位 Windows IE
2.Add 到 IEDriverServer.exe
的 %PATH% 路径
创建项目:
mvn archetype:generate -DarchetypeGroupId=net.serenity-bdd -DarchetypeArtifactId=serenity-cucumber-archetype -DarchetypeVersion=1.8.4
pom.xml的变化:
<serenity.version>2.0.40</serenity.version>
<serenity.cucumber.version>1.9.33</serenity.cucumber.version>
<webdriver.driver>iexplorer</webdriver.driver>
转到页面https://docs.seleniumhq.org/download/
下载 3.14.0 版(推荐)32 位 Windows IE 或 64 位 Windows IE
构建项目并快乐(节省您的时间):
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
我在 Winodws 7 上使用 Internet Explorer 11 尝试 运行 来自 net.serenity-bdd:serenity-cucumber-archetype 的简单项目
做这件事我有很多陷阱。
尽量避免:
1.
java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/username/Java/git_other/test/test/target/test-classes/features
答:不要使用2.0.42版本。
2.
Caused by: java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.ie.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver. The latest version can be downloaded from http://selenium-release.storage.googleapis.com/index.html
回答: 1.Go 到第 [https://docs.seleniumhq.org/download/][1] 页 下载版本 3.14.0(推荐)32 位 Windows IE 或 64 位 Windows IE
2.Add 到 IEDriverServer.exe
的 %PATH% 路径创建项目:
mvn archetype:generate -DarchetypeGroupId=net.serenity-bdd -DarchetypeArtifactId=serenity-cucumber-archetype -DarchetypeVersion=1.8.4
pom.xml的变化:
<serenity.version>2.0.40</serenity.version>
<serenity.cucumber.version>1.9.33</serenity.cucumber.version>
<webdriver.driver>iexplorer</webdriver.driver>
转到页面https://docs.seleniumhq.org/download/ 下载 3.14.0 版(推荐)32 位 Windows IE 或 64 位 Windows IE
构建项目并快乐(节省您的时间):
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------