1
votes
  • Ruby 1.9.3p327
  • watir-webdriver 0.6.1

I have some code which works on one computer but doesn't work on another, and I can't work out why:

require 'watir-webdriver'

b = Watir::Browser.new

timey = Time.now; b.div(:id => 'nonexistant').wait_until_present(0.1) rescue puts "#{Time.now - timey}"

This returns:

60.045506

It should wait for only 0.1 seconds. The only difference I can see between the 2 computers is one is using Ruby p327 and the other is using p286.

I don't know whether this is relevant, but I've noticed a line when webdriver loads stating "blocklist is disabled" which I don't remember seeing before.

2
FYI I've tried removing all add-ons and plugins, and completely resetting the profile, to no avail. - Virtuoso
Odd, the waiting works if I use :index, but not with :name or :id - Virtuoso
It's also doing the same thing with a totally seperate install of Ruby 1.9.2 and a seperate install of Firefox. Looks like I'll have to reformat this laptop :( - Virtuoso

2 Answers

1
votes

watir-webdriver is not yet compatible with Firefox 17 - are you using Firefox? If so check your firefox versions. I updated to 17 and my tests that used waiting methods stopped working (they run fine against 16).

0
votes

I believe that the issue is resolved with the December 7 update to watir-webdriver gem (0.6.2).