I am new to Testing automation but managing testing team who does automation. most of automation are Sales force based application
We have found that sometimes, the IDs or xpath of element (which we have used as locator) gets changed and because of that the scripts fails
what is permanent solution to handle these type of failures?
How can we ensure the scripts does not fails when ID or xpath gets changed?
Please guide me as the xpath and ID changes are creating major problem for us and we are not getting value of automation as the scripts used to fail because of ID or Xpath changes?
I presume when you say ID’s are changing, that means that ID’s are generated dynamically. In that case, I suggest trying parametrization. I believe the following articles and discussions could be helpful:
Yes, we have observed, ID is getting generated dynamically so we started using xpath and thought xpath is unique and will not change but it also changes sometime…so there is not guarantee that the test scripts will not fail. it will fail if the xpath gets changed
could you please elaborate more on this below? Parameterization is not available with which selection method? if it is not available then xpath is the only locators to use or we can use any others locators which are reliable
Warning Parameterizing Web/Mobile Test Object Properties is only available with Basic Selection Method