Please try:
element(:xxx, 'xxx').parent.element(:yyy, 'yyy')
Wesley Chen.
For life, the easier, the better.

On Fri, Oct 30, 2009 at 9:09 AM, Jeff Fry <> wrote:

> Hey all,
> Remind me, is there a way in watir to navigate to the parent of an element?
> I'm thinking of something like:
>     #find text_field where value matches /foo/, go up to the <tr> that
> contains it, and then within that <tr> click on the first <li>
>     browser.text_field(:value => /foo/).row(:parent).li(:index => 1).click
> I made up the .row(:parent) syntax in the above example. I'm just wondering
> if there's real syntax to do the same thing...or if this is more of a
> feature request?
> Cheers,
> --
> Jeff Fry
> >

You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to
Before posting, please read the following guidelines:
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to