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.
This sounds awesome….can’t wait to test it out. Thanks!
This is a very good feature. It worked as expected.
It is noted that Select button (and feature) is not available when Selenium IDE is opened in the Sidebar.
Thanks for the changes and really appreciate your contribution to the community.
Hi Janesh, Thank you. There is no indication about how many people use the sidebar. Until sufficient people come forward with reports that features are not working in the sidebar, I am afraid the priority for it will be limited.
I have the same problem. Use the select button does not work in the sidebar.
I work exclusively in the sidebar.
Thanks! I was not sure if anyone uses the sidebar anymore. The issue with the sidebar is that there is limited space. I will try to find a solution and get it in the sidebar in the future.
Any news on the sidebar issue yet?
We too are working with the Selenium IDE in sidebar mode, and this is driving us crazy.
The limited sidebar space can be changed with a custom user chrome CSS file btw, but that should not be the issue causing the IDE fields not being clickable and not rendering their values.
Selenium IDE 2.8.0 should have the fix.
Works brilliantly Samit! I’ve gotten very good at identifying elements manually by inspecting them an identifying them by css (which recording before never did), but this makes it faster and easier. On a side note… I still can’t get IDE-webdriver working with flow control. Was this extension selected for webdriver compatibility?
Thanks! Webdriver does not support extensions. Making the commonly used plugins Webdriver playback compaible, means rewriting them. I had plans of doing so, but the test scheduler in Selenium IDE took priority. Once, it is shipped, I will be back on improving webdriver support in Selenium IDE and the plugins.
Anyway to disable this feature?
As I work on a complex GWT Application which has some dynamic elements.
It is user driven, so unless you click on the button, it does not do anything. Is it interfering with your application if you do not click on it?
Thanks samit i have been heading into this problem for long time whoa! time to get relive
This is the greatest thing since sliced bread. Just wish I had installed this new version sooner. Nice work and a thousand thank yous.
It’s really good feature.I have tried with myself.Really worked.
Big thanks for the updates.
awesome! No need to use firebug then. Thank You.
This addon feature looks fantastic. but, found the following inconvenience :
The ‘Cancel’ button remains intact even on making the necessary selection for the failed locator. I guess, it should revert back to ‘select’
In my tests, it is working as expected and the cancel button changing to select after you select an element. Please file a bug with details and steps to reproduce on the Selenium project website.
This is great. I wonder if there is an equivalent version of function in selenium to return the element id or class for the elements that people click on the page? Sometimes things fail because of a sequence of actions people perform, and logging the id would help debugging the site.
I am not sure what you are looking for. You want to find out which elements people click on while running the tests? Probably not. If you just put Selenium IDE in record mode, it should automatically capture the elements that people click on and the click commands would have a list of all the possible locators for the elements. Is that not enough?