Hello, I have the html source code: <div id="cabMenu"> <ul> <li class="GI2XGOTBT"> <a class="fBlanco14 negrita" href="#live"> <div class="fixHref"> Live Video </div> </a> </li> <li> <a class="fBlanco14 negrita" href="#recorded"> <div class="fixHref"> Recorded Video </div> </a> </li> <li style="display: none;"> <a class="fBlanco14 negrita" href="#photos"> <div class="fixHref"> Photos </div> </a> </li> <li style="display: none;"> <a class="fBlanco14 negrita" href="#maintenance"> <div class="fixHref"> Maintenance </div> </a> </li> <li style="display: none;"> <a class="fBlanco14 negrita"> <div class="fixHref"> Configuration </div> </a> </li> </ul> </div>
I want to find how many "li tag" there are, I did: li_number = @browser.div(:id => "cabMenu").ul.elements.length But it return 15 also fields there are within the li tag, and it would like it return 5 How can do it? Sincerely regards -- -- 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] --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
