我想在的IntelliJ(v2017.2.5)配置运行/调试配置使用运行写在Groovy的(V2.4)黄瓜测试盖布(V1 .1.1)在Gradle项目中。我需要使用InternetExplorerDriver(V3.6)配置的IntelliJ运行的Groovy黄瓜盖布框架
我想: - 对Groovy插件安装黄瓜并没有按照编辑配置的IntelliJ:
- 主类:
cucumber.api.cli.Main
- 胶水:
C:\automation\Project\src\cucumber\resources\steps C:\automation\Project\src\cucumber\resources\env
- 功能或文件夹路径:
C:/automation/Project/src/cucumber/features
个
程序参数:
--plugin org.jetbrains.plugins.cucumber.java.run.CucumberJvmSMFormatter --monochrome
我收到以下错误,当我运行/调试功能的文件:
geb.driver.DriverCreationException:无法创建回调“script15077602688031015554790 $驱动程序_run_closure2 @ 55d58825'
我试过寻找类似问题的解决方案,它提示了升级硒/ groovy版本(我使用最新版本
- groovyVersion = '2.4'
- gebVersion = '1.1.1'
- seleniumVersion = '3.6.0'
我是新来的Groovy,Geb和Gradle(我知道Java和Maven),因此我怀疑它可能是一个配置问题。
仅供参考,测试通过命令行运行良好。我需要在intellij工作中进行调试。
我注意到,在初始化驱动 的时间[[ie driver = {new InternetExplorerDriver(capabilities)}]] 它无法找到System属性“webdriver.ie.driver”。 [即的println(System.getProperty(“webdriver.ie.driver”)打印出“空”在控制台上。]] 此属性在我的build.gradle设置为黄瓜任务的一部分。 不知道如何确保Intellij中的编辑配置运行设置此属性的gradle任务 – Yogesh
对不起,先前您的回复错过了@James Jones, 感谢您的回复, 是的,我已将'webdriver.ie.driver'属性设置为我的build.gradle以及... FYI,我们也可以提供它在像这样的Intellij Edit Configuration的VM选项中: '-Dwebdriver.ie.driver = C:\ automation \ webdriver \ iedriver \ IEDriverServer.exe' – Yogesh
我不记得对你发表评论,无论如何,你解决了你的问题F。恭喜,并提出了很好的问题。 –