xpath span contains text and class code example
Example 1: xpath id contains text
//div[contains(@id,'test')]
Example 2: xpath contains text
//button[contains(text(),"Go")]
//div[contains(@id,'test')]
//button[contains(text(),"Go")]