Is it possible to retrieve an element using CSS or XPath by searching for its text within a list? Each element in the list includes the Project Name, Status, and Country, separated by a "|"
character.
The challenge lies in obtaining an element based solely on the Project Name and Country without any means to modify the HTML code.
<li>Project 1 | approved | USA</li>
<li>Project 2 | approved | China</li>
<li>Project 3 | disapproved | Russia</li>
I am looking for a way to exclude the approved/disapproved status from the query, similar to:
//li[contains(text(),'Project 1 USA')]
Would it be possible to achieve this using CSS or Xpath?