Selenide GRID-如何配置

时间:2018-06-28 22:29:14

标签: selenium webdriver selenium-grid selenide

我正在尝试使用Selenide运行GRID,但出现错误。我有一个带有两个节点的集线器-一个带有firefox,另一个带有chrom。我也使用这种配置

    Configuration.browser = "chrome";
    Configuration.remote="http://localhost:4444/wd/hub";
    Configuration.baseUrl = "http://typujwynik.cba.pl/index.php?cmd=mypreds";

不幸的是,我得到了:

org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService
Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:32:19.891Z'
System info: host: 'LAPTOP-1OF5RPN0', ip: '192.168.1.18', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_171'
Driver info: driver.version: unknown
Command duration or timeout: 74 milliseconds
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
    at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$new$0(JsonWireProtocolResponse.java:53)
    at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$getResponseFunction$2(JsonWireProtocolResponse.java:91)
    at ...

谁能建议为什么它不起作用? 我Selenide常见问题解答说,添加Configuration.remote="http://localhost:4444/wd/hub";

http://selenide.org/faq.html

1 个答案:

答案 0 :(得分:0)

通过如下配置:

Configuration.remote="http://localhost:4444/wd/hub";

或通过Maven像这样:

-Dremote="http://localhost:4444/wd/hub"

确保浏览器与您的节点匹配,区分大小写可能是一个因素,因为selenide.browserChrome,而您的节点可能为chrome