- Selenium WebDriver 3 Practical Guide
- Unmesh Gundecha Satya Avasarala
- 62字
- 2021-08-13 16:08:07
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.