I have been working in test automation for the last 10 years. The problem that keeps coming up and surprisingly is still unresolved is:
Can we programmatically update locators on UI Change in UI test automation?
What I mean is, automation teams need to run automation suites periodically, and many test scripts fail because of locator changes, not because of Application changes.
Can we make a general algorithm to update an locator automatically based on some structure of the DOM or some other logic?
By doing that, we could run that piece of code before the actual automation suite, in order to identify and isolate locator issues.
This way we can remove unnecessary overhead of running a large automation suite and analyzing it painfully only to find that all we found are locator changes, not any application issues. And finally manually updating all the failed locators with new ones using tools like Developer tools/firebug to find out new ones and manually changing them in the code which is generally the case with most of automation teams.
Has anyone worked with/implemented any solution for such situations?