How to handle dynamic xpath?

The following post of mine months ago may help: