Iam new to watir.. Here is my problem. I have to test 2 websites
( these 2 websites are exactly similar to Orkut.com & linkedin.com )
The testing scenario is simple.I need to search for a term ( such as
apple ipod, or say a place name 'california) and the search results
will result in more than 10 pages . Each page will have 10 search
results & i need to simulate a user clicking on each of the search
results, navingating to the profile and back to the search results
page.. and this need to be repeated for each profile in the 10 pages :
(.
The serach criteria need not be automated , but once the search
results are displayed, then the click to profiles are automated... And
one site is exactly simlar to orkut.com & the other onevery similar to
linkedin.com
Something like ths would help .. Please help me with a quick code...
browser.links.each do |link|
link.click
browser.goto home
end
OR
links = browser.links.collect { |link| link.href }
links.each do |link|
browser.goto link
browser.goto home
end
Instead of looping through a element collection to find some element
value:
def error_exists? text
errors = browser.spans(:class => 'error').collect
errors.each do |span|
return true if span.text == text
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]