Let me start with some quotes.
“Change is inevitable.”
“The only thing constant is change.”
We have all heard these phrases and variations of these before. It is so very true when it comes to tests. Updating tests can be a horrible experience.
One common task performed is to change the locator/selector of an element used in a command. So far this meant recording that step again or manually figuring out what the locator should be using the html source or tools like Firebug. Not any more! With Selenium IDE v2.5.0, it is just a matter of clicks. Here is how to update the locator for a failing test.
- Find the failing command.
- Click on the command.
- Click on the Select button next to the locator.
- Move to the browser. As you move around the elements will get highlighted.
- When you find the one you are looking for, click on it.
- In Selenium IDE, the target will be updated automatically.
- If you want to select an alternative locator, you can click on the drop down to get a list to select from.
- Once you enter the select mode, the select button changes to a cancel button which can be used to cancel selection of a new element.
- Once a new element has been selected, you can use undo to go back to the old one. It may require more than one undo.
- You can also use this select feature to add a locator when manually adding new commands.
I hope you like this feature. As usual, I would love to hear from you.