I am sure a question like this has been answered before, but I couldn't find anything when searching through the existing answer base.
I am generating automated testing scripts for a web application with dynamically generated pages. (based on some configuration sheets) Some of the elements I need to interact with will have IDs that are impossible to know exactly a priori, but they will always be equal up to a certain point - namely the inclusion or not of colon characters.
Concretely, I have element IDs on this form - and I use XPaths to find them;
In one instance I can find the element by the XPath
//*[@id="nav:form:G:0:R:1:C:0:da"]
but in another instance it may be
//*[@id="nav:form:G0:R1:C0:da"]
I know the element IDs will always be the same if you exclude all the colons. Is it possible to write one XPath that will hit either case?