Hi.
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?
Example
https://www.bunnings.com.au/fiskars-x25-xl-splitting-axe_p3360996
The Xpath element to monitor the price of this item looks something like this
//main[@id='main']/div[contains(@class,'jINGaM')]/div[@class='container-main']//div[contains(@class,'dmAWSL')]/div//div[@class='container']/div[contains(@class,'MuiGrid-root')]/div[contains(@class,'productDetails')]/div[contains(@class,'doa-dFD')]/div[contains(@class,'MuiGrid-root')]/div[contains(@class,'MuiGrid-root')]/div[contains(@class,'dhNsnU')]/div[contains(@class,'dVChWy')]//p[contains(@class,'dwOrgK')]
As you can see, many of the @class elements contain dynamically generated random codes
Eg:
(@class,'******')
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!