xpath using and code example Example 1: xpath text //tag[text()='sometext'] Example 2: relative xpath sample //input[@id=’user-message‘]