Answers for "xpath check text equals"

6

xpath contains text

//button[contains(text(),"Go")]
Posted by: Guest on July-10-2020
1

xpath id contains text

//div[contains(@id,'test')]
Posted by: Guest on February-03-2021
0

assert xpath text is exact match

//button[.="abc"]
Posted by: Guest on June-26-2021
0

assert xpath text is exact match

button[text()='abc']
Posted by: Guest on June-26-2021

Browse Popular Code Answers by Language