I have QA, Staging and Production environments. Out of these QA environment is changing(new build) almost daily (if its not the case with everyone lets just imagine it, for sake of the problem).
Every time a new build comes the locators (XPath, ID, Name, CSS, Class etc.) changes and fail the Automation testcases. I want to prepare my Automation testcases in way that it won't fail even when locators changes i.e. when new build comes.
My answer is prepare one properties file for each environment i.e. QA.properties, Staging.properties and Production.properties. Each property file has object repositories. Find and write new locators everytime there is change. But that would be a time consuming task, finding and then writing new locators everyday.
Is their any optimal way of doing it.