我有一台运行Ubuntu 14.04.3的服务器,我正在尝试使用selenium。我以为我已经运行但是当我停止服务并尝试再次启动时它只是挂起
10:16:34.447 INFO - Launching a standalone Selenium Server
10:16:34.494 INFO - Java: Oracle Corporation 24.95-b01
10:16:34.494 INFO - OS: Linux 3.13.0-71-generic amd64
10:16:34.515 INFO - v2.52.0, with Core v2.52.0. Built from revision 4c2593c
10:16:34.620 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
10:16:34.620 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
10:16:34.620 INFO - Driver class not found: com.opera.core.systems.OperaDriver
10:16:34.621 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
10:16:34.622 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped:
registration capabilities Capabilities [{platform=MAC, browserName=safari, version=}] does not match the current platform LINUX
我可以调试/让它工作的任何想法吗?
修改
我正在使用以下命令启动服务器
java -jar selenium-server-standalone-2.52.0.jar
我也打算用phantomjs作为驱动程序。
答案 0 :(得分:0)
请尝试指定实际运行测试的驱动程序。
例如,对于chrome驱动程序:
安装它(from here)
假设chromedriver在当前目录中,请运行: java -jar selenium-server-standalone-2.52.0.jar -Dwebdriver.chrome.driver =。/ chromedriver -port 4545
当然,如果您愿意,可以更改端口:)
希望这有帮助