【发布时间】:2021-07-04 14:45:05
【问题描述】:
我正在准备我的项目,以便能够在 Bitbucket + Jenkins 下启动。 我需要使用远程 Selenium 服务器(如 Selenoid)运行 Selenide 解决方案
如果我在 TestBase 类中对配置进行基本设置,例如:
public void beforeTest(){
Configuration.remote = "http://localhost:4444/wd/hub";
}
只有在从 IntelliJ IDEA 而非控制台运行时才能工作。
如果我运行 Gradle test,它将在本地启动 - 而不是在网格/selenoid 上。
我尝试将该属性添加到 gradle.properties 文件中,例如:
systemProp.selenide.remote=http://localhost:4444/wd/hub
但这也不起作用。
与 build.gradle 文件相同。我尝试了很多选择:
systemProperty("selenide.remote", "http://localhost:4444/wd/hub")
systemProperties['selenide.remote'] = 'http://localhost:4444/wd/hub'
System.setProperty("selenide.remote", "http://localhost:4444/wd/hub")
所有这些都不适合我。
我使用了从控制台添加到 Gradle 的属性:
gradle clean test -Dselenide.remote=http://localhost:4444/wd/hub
这仍然没有按预期工作...... :(
您对可能出现的问题有任何想法吗? 什么应该是适当的解决方案?
【问题讨论】:
标签: gradle selenide selenoid selenium-remotedriver