2
votes

completely new to this and trying to set up the very basics to be able to control Selenium Webdriver. Windows 7, installed Ruby 2.1.5, Selenium-WebDriver 2.45.0 and currently Firefox 33. (I have previously tried Firefox 37, 36, and 35 with the same results eventually finding a stack over flow question where the resolution seemed to be using Firefox 33 would def work).

When I run driver = Selenium::WebDriver.for :firefox in the irb, it opens an instance of firefox but then eventually throws the below error.

irb(main):005:0> driver = Selenium::WebDriver.for :firefox Selenium::WebDriver::Error::WebDriverError: unable to obtain stable firefox conn ection in 60 seconds (127.0.0.1:7055) from C:/Ruby21/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.45.0/lib/se lenium/webdriver/firefox/launcher.rb:79:in connect_until_stable' from C:/Ruby21/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.45.0/lib/se lenium/webdriver/firefox/launcher.rb:37:inblock in launch' from C:/Ruby21/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.45.0/lib/se lenium/webdriver/firefox/socket_lock.rb:20:in locked' from C:/Ruby21/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.45.0/lib/se lenium/webdriver/firefox/launcher.rb:32:inlaunch' from C:/Ruby21/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.45.0/lib/se lenium/webdriver/firefox/bridge.rb:24:in initialize' from C:/Ruby21/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.45.0/lib/se lenium/webdriver/common/driver.rb:31:innew' from C:/Ruby21/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.45.0/lib/se lenium/webdriver/common/driver.rb:31:in for' from C:/Ruby21/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.45.0/lib/se lenium/webdriver.rb:67:infor' from (irb):5 from C:/Ruby21/bin/irb:11:in `'

FYI: ` * LOCAL GEMS *

bigdecimal (1.2.4) childprocess (0.5.6) ffi (1.9.8 x86-mingw32) io-console (0.4.2) json (1.8.1) minitest (4.7.5) multi_json (1.11.0) psych (2.0.5) rake (10.1.0) rdoc (4.1.0) rubyzip (1.1.7) selenium-webdriver (2.45.0) test-unit (2.1.5.0) websocket (1.2.1)`

Any help much appreciated.

EDIT: sorry - running Ruby 2.1.5

1
As far as I know selenium-webdriver 2.45 will work only with the latests firefox 38. You should define which versions should you test. If you want to test FF 37, fowngrade to selenium 2.44Stan E
To me personally it doesn't matter what version I use as I am using it to learn. I can see that ruby, selenium-webdriver and FF have version dependencies so would like some help in determining a correct set up. I Just tried with selenium-webdriver 2.45 and FF38.0b1 and got the same result. Like I said, complete beginner so I could be missing something very fundamental...Andybrad
The fundamental thing is that for testing in specific browsers, you need the specific versions of webdriver (chromedriver, firefoxdriver etc) and selenium standalone by itself. For example for ruby it's seen in a changelog selenium.googlecode.com/git/rb/CHANGES . I will try you configuration to see what could be wrong.Stan E
Hey Stanjer - have you had a chance to reproduce my configuration? I initially just want to control FF and going through selenium website setup, it appears having selenium-webdriver gem should be enough to control FF (I understand that to control Chome I would need chrome driver gem). When you say I need webdriver and selenium stand alone does this mean I need to install another gem? Ultimately my requirement is a configuration that uses Ruby and selenium webdriver to automate a version of FF on Windows 7Andybrad

1 Answers

0
votes

I had this problem because my selenium-webdriver gem version was 2.40 while FF updated to 38.0. It went away when I update the gem.

For those who face a similar problem and want a FF version and a selenium gem version, the following combo works :

FF 38.0.5
selenium-webdriver 2.46.2