[TFUI] Re: [Wtr-general] I am a newb
Phlip <[email protected]> Fri, 1 Sep 2006 12:28:57 -0700
| Newsgroups | gmane.comp.programming.test-first-user-interfaces,gmane.comp.web.watir.general |
|---|---|
| Message-ID | <[email protected]> |
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!!
To unsubscribe, email:
TestFirstUserInterfaces-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/TestFirstUserInterfaces/
<*> To unsubscribe from this group, send an email to:
TestFirstUserInterfaces-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/