Search code examples
moovwebtritium

In Tritium,how to select li which have the same class as other?


<ul class="parent">
   <li class="abc">1</li>
   <li class="abc">2</li>
</ul>

How to select li which have the same class as other?


Solution

  • $('./ul[@class="parent"]/li[contains(text(),"1")]') This is a way you can select any li using text function