Monitoring dynamically generated elements


I have looked at all of the support posts involving dynamic content etc, but could not find a specific solution to what I think must be a common issue.

Pages that I monitor contain dynamic Xpath elements that change daily. Every day the monitors break because they can no longer find the previous day’s element. What is the best way around this please?


The Xpath element to monitor the price of this item looks something like this


As you can see, many of the @class elements contain dynamically generated random codes



Am I best to target the parent class, use wildcards, or would Ihave more luck using a CSS or Javascript selector?

Many thanks for you help!

Hello Andrew, I think you have identified the problem correctly. The autogenerated XPath expressions contain parts that seems to change quite frequently. This makes the selectors unstable.

We recently updated the Chrome and Edge extensions (3.6.17+) to create much better selectors. It does that by trying to remove to unstable looking parts from the selector. If you are using the Firefox extension, which is still on 3.6.12.

Can you try using the webapp at or the Chrome extension to select the elements? Thanks!

Thanks. I reset the monitor using the updated selectors and it seems to be working well. Brilliant. Great update. Thanks so much!

1 Like