Attebery, Bill wrote: > If you have more than one link with 'Cancel' as the text -- it probably > is grabbing a different one is you use > ie.link(:text, 'Cancel').click > > In that case you need to uniquely identify it, and may need to use the > index. > > Try this: > get the page to where this link exists > open a command prompt > run irb and put in the following to connect to your browser instance > > require 'watir' > include 'Watir' > ie=IE.attach(:title, /title of your browser window/) > ie.show_links > try to figure out which one is your link > you can do ie.link(:index, index_number).flash to try to flash different > ones to help you identify it, once you know the index then > ie.link(:index, index_number).click should work I'd think
Note that's the inverse of the reveal() technique I suggested. How would that look in Watir code? The two techniques could reinforce each other! -- Phlip http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!! _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
