jarib/watir-webdriver — Issue #108: watir-webdriver is very slow locating an element by regexp on a heavy page
Author: aikhelis
Created: 2011-12-12 15:36:06+00:00
State: open

I found watir-webdriver to be extremely slow locating an element by regexp on a very big page.

Example on a flight search results page (containing about 50 search results, each of them is a good portion of html structure), FF8.0.1 / Windows7 64 bit:

1.
t=Time.now;browser.div({:id=>”flightModule40”}).exists?;puts
”#{Time.now-t}” #=> 0.202

2.
t=Time.now;browser.div({:id=>/flightModule40/}).exists?;puts
”#{Time.now-t}” #=> 131.046

3.
t=Time.now;browser.div({:id=>/flightModule/, :index=>40}).exists?;puts
”#{Time.now-t}” #=>—is working for 30 minutes for me already…

For comparison, here are some times using watir-webdriver against IE8 and FF3.6

watir-webdriver on IE8:
1. => 0.172017
2 & 3. => Timeout::Error: execution expired from C:/ruby/1.8.7-p334/lib/ruby/1.8/timeout.rb:64:in `rbuf_fill'

watir-webdriver with FF3.6:
=> 0.055005,
=> 80.095009,
=> 101.734173.

All of the above works with acceptable speed in watir 1.6.5 and watir 2.0.4 in IE8.

Originally posted here: http://stackoverflow.com/questions/8360315/watir-webdriver-is-very-slow-locating-an-element-by-regexp-on-a-heavy-page

Page source is attached. Steps to get to the page under test - www.expedia.co.uk/Flights, do a roundtrip search for flights and switch to Return Flights tab on the results page.