Reputation: 5495
If I have this structure:
<Employees>
<Employee id="3">Tom</Employee>
<Employee id="3">Meghna</Employee>
</Employees>
How can I use locators with the wait.until(..)
command to hold till employee
with Id="3"
and text="Tom"
exist?
Upvotes: 0
Views: 2902
Reputation: 26
Try with the below xpath
//Employee[@id='3'][contains(text(),'Tom')]
Upvotes: 0
Reputation: 5818
Go with text()
in xpath to find elements by text
//Employee[@id='3'][text()='Tom']
Upvotes: 2