selenium text xpath code example Example 1: xpath contains text //button[contains(text(),"Go")] Example 2: relative xpath sample //input[@id=’user-message‘]