1 Answers
Different Types of Locators Supported by Selenium WebDriver
There are several types of locators supported by Selenium WebDriver for identifying web elements on a web page. Some of the commonly used locators include:
- ID: Locates elements by their ID attribute.
- Name: Locates elements by their Name attribute.
- Class Name: Locates elements by their CSS class name.
- Tag Name: Locates elements by their HTML tag name.
- Link Text: Locates anchor elements by their link text.
- Partial Link Text: Locates anchor elements by a partial match of their link text.
- CSS Selector: Locates elements using CSS selectors.
- XPath: Locates elements using XPath expressions.
By using these locators efficiently, testers can easily identify and interact with different web elements on a web page using Selenium WebDriver.
Please login or Register to submit your answer