我正在运行基于RSelenium Basics CRAN 页面的以下脚本:
library(RSelenium)
startServer(args = c("-port 4455"), log = FALSE, invisible = FALSE)
remDr <- remoteDriver(browserName = "chrome")
remDr$open()
这会产生以下错误:
Exception in thread "main" java.net.BindException: Selenium is already running on port 4444. Or some other service is.
at org.openqa.selenium.server.SeleniumServer.start(SeleniumServer.java:492)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:305)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:245)
at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:64)
根据GitHub 上此对话的评论,我修改了我的startServer()
命令,如下所示:
startServer(args = c("-port 4455"), log = FALSE, invisible = FALSE)
然后我在控制台中收到以下错误:
Error: Summary: UnknownError
Detail: An unknown server-side error occurred while processing the command.
class: java.lang.IllegalStateException
并且在弹出的Java提示中出现这个错误:
14:38:55.098 INFO - Launching a standalone Selenium Server
14:38:55:161 INFO - Java: Oracle Corporation 25.40-b25
14:38:55.161 INFO - OS: Windows 7 6.1 amd64
14:38:55.161 INFO - v2.46.0, with Core v2.46.0. Built from revision 87c69e2
14:38:55.209 INFO - Driver class not found: com.opera.core.systems.OperaDriver
14:38:55.209 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
14:38:55:289 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4455/wd/hub
14:38:55:289 INFO - Selenium Server is up and running
我不确定缺少 Opera 驱动程序是实际错误还是警告。无论如何,我想使用 Chrome,所以这似乎无关紧要。我究竟做错了什么?