Is it possible to search a element by xpath using regex?
The app I am testing has elements that have patterns in their text like “[0-9]{1,2}.[0-9]{1,2}[a-zA-Z]+” or “Base[0-9]|BaseN/A”, but unfornatelly they have no id’s, their views are dinamic -.- and I can’t find same elements when searching different items.
I read that Xpath 2.0 has a feature to match with element by a pattern, is it possible here ?
Hello @herna,
Currently, Xpath 1.0 is the XML query technology that is mostly supported right now.
Support for XPath 2.0 is still limited and is not supported by most engines (Chrome included).
For this reason TestProject works with Xpath 1.0.
Please read there articles as they may help you find the elements without the need of regex: