首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何在laradock selenium中修复连接失败和连接被拒绝的问题

如何在laradock selenium中修复连接失败和连接被拒绝的问题
EN

Stack Overflow用户
提问于 2019-11-13 22:43:18
回答 1查看 947关注 0票数 1

已使用Lara Dock配置服务器

您可以在浏览器中访问localhost: 4444 / wd / hub。

但是,当我运行测试代码时,我得到以下错误

代码语言:javascript
运行
复制
[2019-11-13 18:53:22] local.ERROR: Curl error thrown for http POST to /session with params: 
{"desiredCapabilities":{"browserName":"chrome","platform":"ANY","chromeOptions": 
{"w3c":false,"binary":"","args":["--user-agent=Mozilla\/5.0 (Windows NT 10.0; Win64; x64) 
AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/75.0.3770.80 Safari\/537.36","disable- 
gpu","lang=ko_KR","disable-infobars","start-maximized"]}}}

Failed to connect to localhost:port 4444: Connection refused {"exception":"[object] 
(Facebook\\WebDriver\\Exception\\WebDriverCurlException(code: 0): Curl error thrown for http POST to 
/session with params: {\"desiredCapabilities\": 
{\"browserName\":\"chrome\",\"platform\":\"ANY\",\"chromeOptions\": 
{\"w3c\":false,\"binary\":\"\",\"args\":[\"--user-agent=Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) 
AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/75.0.3770.80 Safari\\/537.36\",\"disable- 
 gpu\",\"lang=ko_KR\",\"disable-infobars\",\"start-maximized\"]}}}

 Failed to connect to ohmanager.kr port 4444: Connection refused at  
 /var/www/vendor/facebook/webdriver/lib/Remote/HttpCommandExecutor.php:297)

我尝试了127.0.0.1、localhost、selenium、laradock_selenium_1 mydomain等,但没有成功

Docker IP尝试http://10.0.75.1:4444/wd/hub时出现以下错误

代码语言:javascript
运行
复制
Curl error thrown for http POST to /session with params: 
{"desiredCapabilities": 
{"browserName":"chrome","platform":"ANY","chromeOptions": 
{"w3c":false,"binary":"","args":["disable-gpu","lang=ko-KR","disable- 
infobars=true","start-maximized"]}}} Connection timed out after 7001 
milliseconds

为什么会出现这个错误?

我认为主人错了,但我不知道哪里奇怪

我尝试使用laradock_selenium_1更改主机,但仍收到错误

有没有我没做的设置??

下图是我的docker容器状态

EN

回答 1

Stack Overflow用户

发布于 2019-11-13 23:27:29

将ChromeDriver和Selenium更新到最新版本:https://www.seleniumhq.org/download/

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58839573

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档