<div>
  <ul>
    <li>1<l/li>
    <li>2</li>
*    <li>*
*       <ul>*
*         <li>3</li>*
*      </ul>*
*      <ul>*
*        <li>4</li>*
*      </ul>*
    </li>
  </ul>
</div>

pretty sure that lis will grab all of the li's in side of whatever element
is.
@browser.div.lis will return a collection of the lis contained inside of
div

why not use the text of the li?
@browser.li(:text => '3')
@browser.li(:text => '4')


On Fri, Jun 29, 2012 at 10:54 AM, kiran <[email protected]>wrote:

> Hello friends, i am very new to this watir web driver
>
> i am stuck at iterating nodes of a tree , the tree basic structure as
> follows
>
> <div>
> <ul>
> <li>1<l/li>
> <li>2</li>
> *<li>*
> *<ul>*
> *<li>3</li>*
> *</ul>*
> *<ul>*
> *<li>4</li>*
> *</ul>*
> </li>
> </ul>
> </div>
>
> element.lis.each do|i|
>
> end                                        using this block i can traverse
> each and every li element,but how to traverse the li elements which are
> hightlighted in the above html code,please help me friends
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> [email protected]
> http://groups.google.com/group/watir-general
> [email protected]
>

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

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to