XPath doesn't work for dynamic HTML

I found some XPaths chosen by Ui.Vision from recording don’t work well. It’s because many web pages use dynamic HTML. I have to research and change these XPaths to non-dynamic XPath every time. I tried to use OCR to solve this issue. But OCR sometimes can see the defined word sometimes can’t see it (yes, the same word). It feels that manually inputting a non-dynamic XPath is a more reliable solution compared with OCR.

Is there a better or workaround solution for this issue?

Can you provide a sample link to a website or a screenshot of the issue?

Thanks for your prompt reply Admin.

For example, if I use Record to click the “Compose” button in the Gmail, Ui.VIsion will use a Target like “xpath=//*[@id=”:kr"]/div/div". But, this Xpath will not work for a while as Gmail uses a dynamic id. So I have to change the Target to “//div[@gh=‘cm’]” which is a static element. The same issue has also been reported in stackoverflow for selenium.