我创建了一个 Selenium 独立 Firefox docker 容器,并在主机端口:4545 中启动了 session docker run -d -p 4545:4444 --shm-size 2g selenium/standalone-firefox:3.141.59 我检查了http://localhost:4545/是否打开。效果很好。
当我尝试通过 Selenium 代码进行连接时,它向我抛出错误:
请建议我如何解决此问题?
最佳答案
将 RemoteWebDriver URL 更改为 http://localhost:4545/wb/hub至 http://localhost:4545/wd/hub
关于selenium - org.openqa.selenium.WebDriverException : Unable to parse remote response: <! DOCTYPE html>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62081675/