Cannot 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 up and I can do nothing. My IRB does not allow me to enter new commands.

Tried various browser initialization options:

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

Something like this should appear:

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

but there is no way out in the console. After 60 seconds, the 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)

I tried chrome, firefox, the browser opens, but irb locks.

OS: Ubuntu

Ruby: 2.0.0 (also tested on 1.9.3)

+5
source share
1 answer

Selenium::WebDriver::Error::WebDriverError unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055)- it happened when the browser version and version web-driverdid not match. I personally noticed the same thing. The only solution - sync watir-webdriverand version of your browser, as described on the official website.

:

resource1

resource2

resource3

, .

+5

All Articles