I have this HTMLcode:
<div class="A">
<div class="B">
Text1
</div>
</div>
<div class="A">
<div class="B">
Text2
</div>
</div>
So i need to find index of div class='A' where i find some text. I use Watir Webdriver and now i have this code:
if @ff.div(:class=>'A').div(:text=>'Text1')
then ind=@ff.div(:class=>'A').index
end
but of course this doesn't work saying 'undefined local variable or method `index''.