text contains xpath selenium code example
Example 1: contains text xpath
//*[contains(text(),'ABC')]
Example 2: xpath id contains text
//div[contains(@id,'test')]
Example 3: xpath contains text
//button[contains(text(),"Go")]
//*[contains(text(),'ABC')]
//div[contains(@id,'test')]
//button[contains(text(),"Go")]