Quality is delighting customers
If I am getting you right, then, with "Dynamically change xpath", you mean to say that the 'ID' or any other attribute of a web-element changes dynamically in your application.
This is a very common issue faced by an engineer providing test automation services.
You can handle this by any of the following methods:
1. You can use absolute xpath where you need not to give any attribute name In xpath:
2. You can use starts-with function. In this method, you can give that part of web-element ID, which remains same every time.
3. You can use 'contains' function:
Hope this helps.
Thank you so much Anand!