Search code examples
watirwatir-webdriver

Firefox is not loading the url


require 'watir-webdriver'

b=Watir::Browser.new 

b.goto 'www.google.com'

I am writing the above code to open the google.com in firefox, but the problem is, control is not leaving the second line even after opening the firefox browser and later it throws the given below error, Can anyone suggest me how to overcome this problem?

/webdriver/firefox/launcher.rb:90:in `connect_until_stable': unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055) (Selenium::WebDriver::Error::WebDriverError)

Solution

  • This pops up occasionally and it seems like one of the best options to start with is updating the selenium-webdriver gem. That did the trick for me.

    gem update selenium-webdriver
    

    I currently run with selenium-webdriver (2.53.4) with no issues.