If I use question mark, which should mean which ever tag, and some property, like innertext with some rubbish which does not exist in the AUT, both Ranorex and Spy claims the element is found.
If I use what ever tag instead of question mark, the element is not found (which is correct). Why the question mark works here incorrectly?
.//?[@innertext='xxxx'] is always found
Re: .//?[@innertext='xxxx'] is always found
Hi,
Question mark does not mean “whichever” but “optional”! For “any” tag, use asterisk, like //*[@innertext=‘xxxx’]
Question mark does not mean “whichever” but “optional”! For “any” tag, use asterisk, like //*[@innertext=‘xxxx’]
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: .//?[@innertext='xxxx'] is always found
Thanks Odklizec! How simple mistake...
Re: .//?[@innertext='xxxx'] is always found
Hi,
You are welcome. Don't worry about this. This could happen to anyone
I just debugged one thing for half an hour, only to find how stupid mistake I did 
You are welcome. Don't worry about this. This could happen to anyone


Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration