Maybe somthing like this

http://stackoverflow.com/questions/7245702/watir-webdriver-counting-number-of-items-in-a-ul-list

MyList = browser.ul(:id => "rcbList")

MyList.lis.each do |li|
  puts li.text
  MyArray << li.text  #etcend


On Monday, September 30, 2013 7:46:06 AM UTC-5, sp22 wrote:
>
> I have html code like -
>
> <div id="unique_id">
>  <div class="rcbScroll rcbWidth">
>    <ul class="rcbList">
>     <li class="rcbItem">Value1</li>
>     <li class="rcbItem">Value2</li>
>     <li class="rcbItem">Value3</li>
>     <li class="rcbItem">Value4</li>
>     <li class="rcbItem">Value5</li>
>    </ul>
>   </div>
> </div>
>
> Can you please suggest how I can create an array with the values in the 
> list?
>
> Thanks!
>

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