How to find elements with xpaths code example Example 1: html xpath name //input[@name='username'] Example 2: relative xpath sample //input[@id=’user-message‘]