无法在CentOS7上启动Selenium Server

时间:2016-01-15 06:19:49

标签: java selenium

在CentOS7上启动Selenium Server是否有任何限制?以下是我的环境。我能够在CentOS6.5上启动它。

曾为

  • CentOS6.5
  • 内核:2.6.32-431.17.1.el6.x86_64
  • java:1.8.0_65
  • Selenium Server:2.47.1

    # java -jar selenium-server-standalone-2.47.1.jar
    14:44:39.511 INFO - Launching a standalone Selenium Server
    14:44:39.580 INFO - Java: Oracle Corporation 25.65-b01
    14:44:39.581 INFO - OS: Linux 2.6.32-431.17.1.el6.x86_64 amd64
    14:44:39.612 INFO - v2.47.1, with Core v2.47.1. Built from revision 411b314
    14:44:39.769 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
    registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform LINUX
    14:44:39.771 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
    registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform LINUX
    14:44:39.771 INFO - Driver class not found: com.opera.core.systems.OperaDriver
    14:44:39.771 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
    14:44:39.935 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
    14:44:39.935 INFO - Selenium Server is up and running
    

没有工作

  • CentOS7
  • 内核:3.10.0-229.7.2.el7.x86_64
  • java:相同版本
  • Selenium Server:相同版本

    # java -jar selenium-server-standalone-2.47.1.jar
    05:47:08.911 INFO - Launching a standalone Selenium Server
    05:47:08.988 INFO - Java: Oracle Corporation 25.65-b01
    05:47:08.988 INFO - OS: Linux 3.10.0-229.7.2.el7.x86_64 amd64
    05:47:09.015 INFO - v2.47.1, with Core v2.47.1. Built from revision 411b314
    05:47:09.145 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
    registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform LINUX
    05:47:09.146 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
    registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform LINUX
    05:47:09.146 INFO - Driver class not found: com.opera.core.systems.OperaDriver
    05:47:09.146 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
    

谢谢。

1 个答案:

答案 0 :(得分:0)

我认为这个答案可以提供帮助。请参阅Selenium standalone server not starting

简而言之:只需在启动selenium时添加参数:-Djava.security.egd = file:/// dev / urandom switch并且你很高兴