1.css定位
学习地址:https://www.runoob.com/cssref/css-selectors.html
input[name=“userAccount”]
div[class=“hwid-input-root”]>input 解释:子集
.代表class,如.hwid-input-tipsBoard nextclass 解释:" "空格代表所有后代
#代表id,#banner div
2.xpath
学习地址:https://www.runoob.com/xpath/xpath-syntax.html
//[text()=‘扫码登录’]
//[text()=‘扫码登录’]/…/… 解释:向上面的分支找
//input[@name=“userAccount”] 解释:等同于css1
3.playwright
官网介绍地址:https://playwright.dev/python/docs/intro
//*[text()=‘扫码登录’] >> #cssname 解释:前边用xpath,后边用css