2

I am trying to find the Xpath for the below image. The one on the right is the Download File link and the right is element DOM.

enter image description here

I have tried with directly copying the Xpath and also used the Contains text "Download File" but my script is not working and giving No Such Element exception.

Could you please let me know the possible Xpath for these.

Thanks !

Tried to find Xpath's using contains and as list, but did not work.

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Dec 06 '22 at 12:22
  • A wild guess would be : `//li[contains(@class,"jss20 jss88")][@tabindex="0"]//a[contains(text(),"DOWNLOAD FILE")]` – E.Wiest Dec 15 '22 at 14:49

1 Answers1

0

To identify the li element, you can use //li[contains(.,'DOWNLOAD FILE')]

.(dot) can compare the text of any children or descendant elements of li, whereas text() can only compare the text of li element.

If you want help to identify the exact element, you will have to provide the DOM of li children as well.