Learn Alternate Locators Using Selenium IDE

List of locators in Selenium IDE

A locator in Selenium is a means of identifying an element for the selenium command. Usually it is the target part of the command. Did you know that when recording with the Selenium IDE, sometimes the target textbox changes into a dropdown list? Go ahead and try it out.

  1. Start the Selenium IDE.
  2. Go to the http://seleniumhq.org/ page.
  3. Right-click on the first point saying “Begin: write and run tests in Firefox”.
  4. Then choose Show All Available Commands and then VerifyText Step1 1. Begin: write and …
  5. In the IDE, click on the VerifyText command just recorded and you will see the target textbox change to a dropdown list.
  6. Open the dropdown list to see all the available locators.

This is often a powerful tool to select alternate locators for elements in your Selenium commands. It can also be a training tool to learn new ways of selecting elements when you are still trying to learn XPATH and CSS selectors.

This entry was posted in Selenium Tips and tagged , , , , . Bookmark the permalink.