find element by xpath with contains text within another tag code example
Example 1: contains text xpath
//*[contains(text(),'ABC')]
Example 2: xpath contains text
//button[contains(text(),"Go")]
//*[contains(text(),'ABC')]
//button[contains(text(),"Go")]