期望的结果
我尝试了什么
java -jar tests/selenium-server.jar -Dwebdriver.chrome.driver=chromedrive &
构建卡在此步骤
nohup java -jar tests/selenium-server.jar -Dwebdriver.chrome.driver=chromedrive > log.txt &
OR
root@PIV:/usr/share/nginx/pivdev/tests# java -jar selenium-server.jar
它通过了启动服务器步骤,但我的测试无法运行,因为它无法连接到selenium服务器
**更新1 ** 这似乎与我的VPS有关。 即使通过ssh,selenium服务器也无法启动。
21:53:08.857 INFO - Launching a standalone Selenium Server
21:53:08.911 INFO - Java: Oracle Corporation 24.79-b02
21:53:08.914 INFO - OS: Linux 3.13.0-52-generic amd64
21:53:08.945 INFO - v2.47.1, with Core v2.47.1. Built from revision 411b314
21:53:09.070 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}] does not match the current platform LINUX
21:53:09.071 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities [{platform=WINDOWS, browserName=MicrosoftEdge, version=}] does not match the current platform LINUX
21:53:09.071 INFO - Driver class not found: com.opera.core.systems.OperaDriver
21:53:09.071 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
输出:
org.apache.camel.component.bean.AmbiguousMethodCallException: Ambiguous method invocations possible:
public org.apache.camel.Endpoint
org.apache.camel.impl.DefaultComponent.createEndpoint(java.lang.String) throws java.lang.Exception
public org.apache.camel.EndpointConfiguration
org.apache.camel.impl.DefaultComponent.createConfiguration(java.lang.String) throws java.lang.Exception
答案 0 :(得分:1)
问题出在我的设置上。
selenium服务器等待启动,因为它正在等待系统在/ dev / random生成随机数据。
有关详细信息,请查看我的其他问题Selenium standalone server not starting
答案 1 :(得分:0)
如果您想在jenkins中运行selenium web驱动程序测试用例,请浏览视频: