I have HTML with the following structure and wish to how the inner most li's:
<div id="topDiv" ..... >
<div ...... >
<ul class="lists" ...>
<li .....>
<ul ....>
<li id="importantlist1">
<li id="importantlist2">
...
...
</ul>
</li>
</ul>
</div>
</div>
I want to count the li's i.e. total number. The top div and first ul has id's as well as each important li. I tried using cssSelector, xpath but Its not working.