selenium catch element by xpath containg another element code example Example: contains text xpath //*[contains(text(),'ABC')]