Running Ruby1.9.1 and using watir-webdriver gem.
In my testing a new page pops up and can more than 30 seconds to load.
Below is my current code that is failing, meaning it still times out after
30 seconds. I also tried setting the client timeout but failed at that,
but I may have been doing that wrong.
Any suggestions?
Thanks in advance.
-Hams
browser = Watir::Browser.new
browser.goto reporturl
browser.text_field(:index, 0).set username
browser.text_field(:index, 1).set password
browser.button(:value, 'Login').click
## For Each Page with Retries #############################################
for i in 1..pages-1 do
## Click All Retry links on Page ########################################
retry_links = browser.links.find_all { |link| link.text =~ /Retry/ }
retry_links.each do |thelink|
thelink.click
browser.window(:title => "New Tab").wait_until_present(timeout=180)
browser.window(:title => "New Tab").use do
browser.button(:id, 'close').wait_until_present
browser.button(:id, 'close').click
end
end
## Go to Next Page #####################################################
browser.link(:id, 'page/next').click
end
## Click All Retry links on Last Page ####################################
retry_links = browser.links.find_all { |link| link.text =~ /Retry/ }
retry_links.each do |thelink|
thelink.click
browser.window(:title => "New Tab").wait_until_present(timeout=180)
browser.window(:title => "New Tab").use do
browser.button(:id, 'close').wait_until_present
browser.button(:id, 'close').click
end
end
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]