HomeSelenium

Locators for Selenium – Different Types of Locators

Locators for Selenium – Different Types of Locators

<<Previous Post                            << Complete Tutorial>>                              Next Post>>

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):

  1. ID
  2. Name
  3. Class Name
  4. Link Text
  5. CSS Selectors
  6. XPath Expressions
  7. DOM

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.

Next Steps:

  • > 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 🙂

About Me > Arun Motoori

On a mission to contribute to the Software Testing Community in all possible ways.

<<Previous Post                            << Complete Tutorial>>                              Next Post>>

If you like this article, share it on LinkedIn using the below button:

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *