[Solved] every day xpath are changing [closed]


If your xpath will always be changing, to get your Selenium code to work atleast there should be some pattern in how it changes, for example it may be dependent on current date. Then you can code accordingly to generate your xpath dynamically every time you run your script. If there is no such pattern and no static content to be able to use contains in xpath, you should check out other tools like Sikuli. It uses image recognition to identify your element. This again assumes that the visible aspect of your element remains same.

There is also a wave of new testing products powered by AI like Testim which are “self healing”, meaning they will adapt to changes in the source code. I haven’t used them but they are probably what you want.

4

solved every day xpath are changing [closed]