gpt4 book ai didi

java - Selenium 服务器未启动

转载 作者:太空宇宙 更新时间:2023-11-03 17:11:45 27 4
gpt4 key购买 nike

我有一台运行 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做驱动。

最佳答案

请尝试指定一个实际运行测试的驱动程序。

例如,对于 chrome 驱动程序:

  1. 安装它(from here)

  2. 假设 chromedriver 在当前目录中,运行:java -jar selenium-server-standalone-2.52.0.jar -Dwebdriver.chrome.driver=./chromedriver -port 4545

当然,您可以根据需要更改端口:)

关于java - Selenium 服务器未启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35413025/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com