1. 绝对路径
# /是绝对路径定位
/html/body/div[1]/div[1]/div[5]/div/div/form/span[1]/input
2. 相对路径
# //是相对路径定位
//span/input
3. 索引定位
//form/span[1]/input
4. 属性定位
# 属性可以放在对应的路径层级中使用
//input[@autocomplete="off"]
//div[@class="ivu"]/div/div/div[2]/div[2]/button[1]
5. 通配符定位,通配符就是*,*就是任何一个都可以的意思
# 任意一个标签,只要符合后面的属性就可以
//*[@id="kw"]
# input标签,不管什么属性只要属性符合就可以
//input[@*="kw"]
6. 部分属性,模糊匹配
# 包含f的autocomplete属性
//input[contains(@autocomplete,"f")]
# 以of为开头的autocomplete属性
//input[starts-with