li_number = @browser.div(:id => "cabMenu").ul.lis.length

On Wednesday, October 2, 2013 10:10:06 AM UTC-4, LuisE wrote:
>
> And how do I ask only for how many  li's there are?
>
>
> On 2 October 2013 12:54, Oscar Rieken <[email protected] <javascript:>>wrote:
>
>> you are asking for elements inside of the ul, which i guess if you 
>> counted every valid type of element inside of the ul tag its 15 why dont 
>> you ask for how many li's are inside of the ul?
>>  
>>
>> On Wed, Oct 2, 2013 at 5:35 AM, Luis Espla <[email protected]<javascript:>
>> > wrote:
>>
>>> 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] <javascript:>
>>> http://groups.google.com/group/watir-general
>>> [email protected] <javascript:>
>>>  
>>> --- 
>>> 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] <javascript:>.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  -- 
>> -- 
>> Before posting, please read http://watir.com/support. In short: search 
>> before you ask, be nice.
>>  
>> [email protected] <javascript:>
>> http://groups.google.com/group/watir-general
>> [email protected] <javascript:>
>>  
>> --- 
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
-- 
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.

Reply via email to