jz999
jz999

Reputation: 619

Watir webdriver rows performance

I am trying to zero in on a specific row on a webpage using watir-webdriver. The code I use is pretty straightforward:

b = Watir::Browser.new
frame = b.frames.first
frame.tables[3].rows[2].flash

This flashes the correct row, the problem is that it takes a long time when there are a lot of rows. It takes ~30 seconds or so when there are ~3000 rows. It looks like the script iterates over all the rows before flashing the row I've selected, though I'm not sure (webdriver is flashing on the bottom right of Firefox). I've tried using 'row' instead of 'rows', but for some reason this actually flashes the columns instead of the rows. Is there a command in watir to select rows that is quicker?

Upvotes: 1

Views: 188

Answers (1)

Željko Filipin
Željko Filipin

Reputation: 57312

I wrote a blog post with a solution to a similar problem. I have used Nokogiri to speed up Watir: http://zeljkofilipin.com/watir-nokogiri/

Upvotes: 1

Related Questions