Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to connect to chromedriver http://127.0.0.1:50299 (Selenium::WebDriver::Error::WebDriverError) [duplicate]

I get this error when I run my cucumber tests:

"*Unable to either launch or connect to Chrome. Please check that ChromeDriver is up-to-date. Using Chrome binary at: /opt/google/chrome/google-chrome (Selenium::WebDriver::Error::UnknownError) *"

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.

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

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

capybara (1.1.2)

cucumber (0.9.4)

cucumber-rails (0.3.2)

selenium-webdriver (2.20.0)

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

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

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"

like image 416
Shahrzad Avatar asked Nov 26 '22 00:11

Shahrzad


1 Answers

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.

Did you read https://wiki.jenkins-ci.org/display/JENKINS/My+software+builds+on+my+computer+but+not+on+Jenkins ?

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?

like image 80
sti Avatar answered Dec 09 '22 19:12

sti