A couple of piggyback comments on the above.

a) first question about accessing elements in a frame:

browser.frame(:id, "foo").link(:href => /
productpref=catalog/).click    # the example frame has no attributes,
so I guess you could use index...

b) lots of javascript in the second example, so you might need to
trigger the event:

browser.link(:id,
"foo").fire_event("onmouseover")                            #
mouseover is an example event handler

HIH.

orde



On Feb 1, 3:52 pm, Dave McNulla <mcnu...@gmail.com> wrote:
> For the first question, I would try these:
> browser.link(:href => /productpref=catalog/).click
> browser.link(:text => 'catalog').click
>
> For the second question, I would try these:
> browser.link(:text => 'Active').click
> browser.link(:href => /List Catalogs/).click
>
> Of course I wouldn't give up if those did not work, but I would try to
> following identification methods (probably in that order) OR a combination
> of them:
> :href
> :name
> :id
> :text
> :index
> :class
> :html
> :after
> :xpathhttp://wiki.openqa.org/display/WTR/HTML+Elements+Supported+by+Watir
>
> Dave

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

Reply via email to