Three, WebDriver API__1. Targeting elements in the overview

Webdriver positioning method provides eight elements:
Webdriver provides a method of locating eight elements, corresponding to the Java syntax:
ID -----> findElement (By.id ()); or findElements (By.id ());
name - ----> findElement (By.name ());
class name -----> findElement (By.className ());
Tag name -----> findElement (By.tagName ());
Link text -----> findElement (By.linkText ());
partial text Link -----> findElement (By.partialLinkText ());
XPath -----> findElement (By.xpath ());
CSS selector -----> findElement (By.cssSelector () );

Guess you like

Origin www.cnblogs.com/surenliu/p/12332670.html