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