following xpath syntax code example Example 1: xpath contains text //button[contains(text(),"Go")] Example 2: html xpath name //input[@name='username']