- id
- name
- tagName
- className
- link Text
- partialLinkText
cssSelector
- tagName
By.cssSelector("input")
- ID
By.cssSelector("input#id");
By.cssSelector("#id");
- 根据className样式名
By.cssSelector(".className");
By.cssSelector("input.className");
xpath
绝对路径
相对路径
//*[@name='phone']
//input[@maxlength='100' and @autocomplete='off']
//a[contains(text0,' hao123')]
//a[text0='新闻']