0

I need a generic xpath(with out using the numbering) for the following HTML code

<label class="Testclass">Examples loaded ( 111 / 222 )</label>

Using below xpath I am unable to find the element.

//label[contains(text(),'Examples loaded')]
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • 1
    for me the given xpath finds a label with that text in a html file. Are you sure your HTML contains the quoted label? – ruud May 28 '20 at 13:46
  • Yes, it has quoted label. – lohitha May 29 '20 at 05:13
  • Since the xpath is OK, you should focus on finding the reason why the element is not found. Once that is done, you can try to improve the xpath if you feel that is necessary. Is the HTML that is queried indeed the HTML containing the label? – ruud May 29 '20 at 12:39

0 Answers0