In my site I have this list:
<ul class="test">
<li class="social_1"></li>
<li class="social_2"></li>
<li class="social_3"></li>
<li class="social_3"></li>
</ul>
My question is: how can I count li in my ul class test I have tried this:
my_ul = page.find("ul[class='test']")
my_ul.each do |li|
pp li['class']
end
but it doesn't work.
Is there anyway to do something like I coded above?