【问题标题】:org.openqa.selenium.WebDriverException: Unable to parse remote response: <!DOCTYPE html>org.openqa.selenium.WebDriverException:无法解析远程响应:<!DOCTYPE html>
【发布时间】:2020-05-29 08:23:51
【问题描述】:

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

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

我的示例代码如下:

请建议我如何解决这个问题?

【问题讨论】:

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


    【解决方案1】:

    将 RemoteWebDriver 网址从 http://localhost:4545/wb/hub 更改为 http://localhost:4545/wd/hub

    【讨论】:

    • :) 没问题,我的朋友。我很高兴您能够找出根本原因
    猜你喜欢
    • 2021-11-27
    • 2017-09-26
    • 1970-01-01
    • 1970-01-01
    • 2019-11-27
    • 1970-01-01
    • 2018-06-19
    • 1970-01-01
    相关资源
    最近更新 更多