I am testing a website which is still in development.
Often an element\'s id, class, text, or position in the DOM will change. And then the locator I\'ve been using wil
It's an interesting approach, but I'm concerned you might be masking other issues. I'd prefer to work more closely with the developers to avoid breaking UI issues in the first place.
Are the changing IDs dynamically produced? If that's the case, look to see if you can't get a suffix on the IDs, something like _loginlink. You might also have to work with an XPath that starts from a nearby static ID: "//div[@id='login_link_container'/a". (Starting from the root of the document like your example shows is a recipe for pain! :) )