New question, though. I was digging through the Watir mailing list archive looking for any information about how to access links that are in an image map. Didn't come up with anything and was wondering if there was a way to do this? I've created a function that basically goes through a page, grabs all the links, puts them in an array and then I have another function that takes in that array and clicks all the applicable links. Examples:
def get_links()
@links = Array.new
@ie.links.each do |link|
@links.push(link.href)
end
return @links
end
def click_links(pages)
pages.each do |page|
puts "Step: Click the \"#{page}\" link"
@ie.link(:url, page).click
@ie_pop = IE.attach(:url, page)
@ie_pop.wait
# do some assertions here
@ie_pop.close
end
end
def test_links
@list = get_links()
click_links(@list)
end
I keep printing out the array '@links' in the 'test_links' method and I don't see the links that happen to be in image maps. Do I need to write another function that looks @ at image maps and put those into another array?
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
