xpath @text() vs text() code example Example 1: xpath text //tag[text()='sometext'] Example 2: xpath contains text //button[contains(text(),"Go")]