Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can not use variable in IRB after var = Watir::Browser.start 'url'

1.9.3-p327 :001 > require 'watir-webdriver'
=> true 
1.9.3-p327 :002 > b = Watir::Browser.new

Then firefox starts and I can do nothing. My IRB does not allow me to enter new commands.

Tried different variations of browser initialization:

b = Watir::Browser.new :opera
b = Watir::Browser.new :firefox
b = Watir::Browser.start 'url'

There should appear something like:

=> #<OperaWatir::Browser:0x1496e57 @active_window=#<OperaWatir::Window:0x1eb1db2
@browser=#<OperaWatir::Browser:0x1496e57 ...>>,@driver=#
Java::ComOperaCoreSystems::OperaDriver:0xeabd2f>>

but there is no output in console. After 60 seconds browser closes and I get the following output:

1.9.3-p327 :002 > b = Watir::Browser.new
Selenium::WebDriver::Error::WebDriverError: unable to obtain stable firefox connection
in 60 seconds (127.0.0.1:7055)

Tried chrome, firefox, browser opens, but irb locks.

OS:Ubuntu

Ruby: 2.0.0 (also tried on 1.9.3)

like image 676
Ivan Danci Avatar asked Apr 16 '13 10:04

Ivan Danci


1 Answers

Selenium::WebDriver::Error::WebDriverError unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055) - this happened generally when your browser version and web-driver version not matched. I personally observed the same. Only solution is to synchronize watir-webdriver and your browser version as documented in their official site.

Here are some Good resources of the fact:

resource1

resource2

resource3

Hope it will help you out.

like image 137
Arup Rakshit Avatar answered Sep 30 '22 04:09

Arup Rakshit