xpath has text code example
Example 1: contains text xpath
//*[contains(text(),'ABC')]
Example 2: xpath text
//tag[text()='sometext']
Example 3: xpath contains text
//button[contains(text(),"Go")]
//*[contains(text(),'ABC')]
//tag[text()='sometext']
//button[contains(text(),"Go")]