无法连接到chromedriver http://127.0.0.1:46050(Selenium :: WebDriver :: Error :: WebDriverError) [英] unable to connect to chromedriver http://127.0.0.1:46050 (Selenium::WebDriver::Error::WebDriverError)

查看:1330
本文介绍了无法连接到chromedriver http://127.0.0.1:46050(Selenium :: WebDriver :: Error :: WebDriverError)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在运行黄瓜测试时遇到此错误:

I get this error when I run my cucumber tests:

* 无法启动或连接到Chrome浏览器请检查ChromeDriver是否正常运行使用Chrome二进制文件:/ opt / google / chrome / google-chrome(Selenium :: WebDriver :: Error :: UnknownError)
*

我下载了chromdriver,将其解压缩,然后将其复制到路径(/ opt / google / chrome / google-chrome)和sudo chmod + x / opt / google / chrome / google-chrome。

I downloaded the chromdriver, unzip it, copy it to the path (/opt/google/chrome/google-chrome ) and sudo chmod +x /opt/google/chrome/google-chrome.

其中google-chrome:/ usr / bin / google-chrome

which google-chrome : /usr/bin/google-chrome

其中chromedriver:/ usr / share /ruby-rvm/gems/ruby-1.9.2-p318/bin/chromedriver

which chromedriver : /usr/share/ruby-rvm/gems/ruby-1.9.2-p318/bin/chromedriver

capybara(1.1.2)

capybara (1.1.2)

黄瓜(0.9.4)

cucumber-rails(0.3.2)

cucumber-rails (0.3.2)

webdriver(2.20.0)

selenium-webdriver (2.20.0)

我搜索了我的错误,但没有答案对我有用!
当我运行我的测试,我没有看到chrome开始!

I searched my error but none of the answers worked for me! When I run my test I do not see chrome starts!

我真的不知道是什么问题!我尝试了两个不同版本的chromedriver!

I really dont know what is wrong! I tried two different versions of chromedriver!

Jenkins应该在CI中运行/执行我的测试。我可以运行他们由另一个用户,然后我安装jenkins,我得到这个错误。当我在终端的终端运行我的测试时,我得到相同的错误。因为你阅读 https://wiki.jenkins-ci.org/display/JENKINS/My+software+builds+on+my+computer+but+not+on + Jenkins ?我不能在这里找到我的问题。 xvfb:我在jenkins安装插件,但在构建环境中,如果我单击运行xvfb之前的构建和关闭它,我得到这个错误:FATAL:null java.lang.NullPointerException

Jenkins should run/executes my tests in CI.The tests work when you run them but not when Jenkins runs them? I could run them by another user and then I installed jenkins and I get this error. I get the same error when I run my tests in terminal at terminal as well.Did you read https://wiki.jenkins-ci.org/display/JENKINS/My+software+builds+on+my+computer+but+not+on+Jenkins ? I couldnt find much about my problem here. xvfb: I installed the plugin in the jenkins but in the build environment if I click "run xvfb before the build and shut it down after", I get this error: "FATAL: null java.lang.NullPointerException"

推荐答案

请提供更多详情。这个问题与Jenkins有什么关系? Jenkins是否执行测试?测试工作在你运行它们时,但不是当Jenkins运行它们?你不会大声说出来,但我会假设,因为这是人们通常需要帮助。

Please provide more details. How does this question relate to Jenkins? Is Jenkins executing the tests? The tests work when you run them but not when Jenkins runs them? You do not go so far as to say that out loud, but I will assume it because it is what people usually need help with.

你读过 https://wiki.jenkins -ci.org/display/JENKINS/My+software+builds+on+my+computer+but+not+on+Jenkins

如果您正在Jenkins作业中执行Chrome,您是否有类似 https:// wiki。 jenkins-ci.org/display/JENKINS/Xvfb+Plugin https ://wiki.jenkins-ci.org/display/JENKINS/Xvnc+Plugin

If you are executing Chrome inside a Jenkins job, do you have something like https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin or https://wiki.jenkins-ci.org/display/JENKINS/Xvnc+Plugin installed?

这篇关于无法连接到chromedriver http://127.0.0.1:46050(Selenium :: WebDriver :: Error :: WebDriverError)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆