101
Selenium WebDriver- Locating Strategies
Just like Selenium IDE, WebDriver uses the same set of locating strategies for specifying location of a particular web element.
Since, we are using WebDriver with java; each locating strategy has its own command in Java to locate the web elements.
Note: Locating web elements in Webdriver is performed with the help of findElement() and findElements() method.
A list of Locating Strategies used in WebDriver:
- Locating Strategies By ID
- Locating Strategies By Name
- Locating Strategies By Class Name
- Locating Strategies By Tag Name
- Locating Strategies By Link Text
- Locating Strategies By Partial Link Text
- Locating Strategies By CSS
- Locating Strategies By XPath
Next TopicHandling Drop-Downs