In our previous article, we have understood that Selenium uses Locators for locating different UI elements that are available on the Web Page and won’t have any inbuilt mechanism to find the UI elements on its own.
Locators for Selenium – Different Types of Locators
So, in this article, let’s find out the different types of Locators we can use with Selenium for finding the UI Elements on the Web Pages.
The following are the different types of locators we can use in Selenium for finding the UI Elements during Run time (i.e. during Code Execution):
- Class Name
- Link Text
- CSS Selectors
- XPath Expressions
How to use these locators with different components of Selenium like Selenium IDE or Selenium WebDriver will be explained in the upcoming articles.
To get started, I will start demonstrating these different locators practically using the simplest Selenium Component i.e. Selenium IDE in the upcoming articles.
- > To learn more about Selenium, continue to the next post (Click on Next Post link below)
- > Check complete Selenium Tutorial Contents here (Click here)
Please leave your questions/comments/feedback below.
Happy Learning 🙂
On a mission to contribute to the Software Testing Community in all possible ways.