selenium - org.openqa.selenium.WebDriverException : Unable to parse remote response: <! DOCTYPE html>

标签 selenium selenium-webdriver selenium-grid remotewebdriver selenium-docker

我创建了一个 Selenium 独立 Firefox docker 容器,并在主机端口:4545 中启动了 session docker run -d -p 4545:4444 --shm-size 2g selenium/standalone-firefox:3.141.59 我检查了http://localhost:4545/是否打开。效果很好。

当我尝试通过 Selenium 代码进行连接时,它向我抛出错误: enter image description here

enter image description here

我的示例代码如下: enter image description here

请建议我如何解决此问题?

最佳答案

将 RemoteWebDriver URL 更改为 http://localhost:4545/wb/hubhttp://localhost:4545/wd/hub

关于selenium - org.openqa.selenium.WebDriverException : Unable to parse remote response: <! DOCTYPE html>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62081675/

相关文章:

selenium - 使用 Selenium 测试 Liferay 门户

java - 无法从 iframe 内的下拉列表中选择选项 - selenium - java8

java - Selenium 网络驱动程序 : List is not generic; it cannot be parameterized with arguments `<WebElement>` type

java - 有没有办法单击我刚刚使用 java/selenium 安装的 chrome 扩展?

java - 如何将 selenium webdriver 实例与 java 绑定(bind)并行化?

c# - 有没有人找到并行运行 C# Selenium RC 测试的方法?

java - Selenium Web 驱动程序中的选择器问题

java - Selenium chromedriver 意外停止

Java (Selenium) - 用于初始化子类的父类(super class)构造函数

java - 如何将当前功能传递给单个测试