With such a dom tree:
<tr></tr>
<tr style=""></tr>
<tr width=""></tr>
How can I use xpath to get the tag tr with the attr style?
I have tried the xpathexpression of //tr[@style] but it returns 0 trs.
If I use //tr[@*] it returns 2 trs.
What’s wrong?
Try
//tr[@style=''], @style selects value of the attribute and since it is empty it is treated as false.