- Learn Selenium
- Unmesh Gundecha Carl Cocchiaro
- 62字
- 2021-06-24 13:25:33
Using the By locating mechanism
By is the locating mechanism passed to the findElement() method or the findElements() method to fetch the respective WebElement(s) on a web page. There are eight different locating mechanisms; that is, eight different ways to identify
an HTML element on a web page. They are located by ID, Name, ClassName, TagName, LinkText, PartialLinkText, XPath, and CSS Selector.