My company is evaluating Ranorex and I'm having an issue with the Exists and NotExists Validations against a Repository item with a RanoreXPath which uses Expressions. Specifically I'm trying to creating a generic reusable validation which checks the page for an error message and, if an error exists, the validation fails. What I'm seeing is that my NotExists validation is always passing even if the repository item (the error) is on the page. Shouldn't it fail if it is finding the item?
My repository item has an Xpath like this:
Code: Select all
/dom[@domain~'.*myurl1.com' or @domain~'.*.*myurl2.com' or @domain~'.*.*myurl3.com']//div[@id='ctl00_ValidationSummary' and @visible='True']
I've also tried the repository item like this (since the error text is red) with the same results:
Code: Select all
/dom[@domain~'.*myurl1.com' or @domain~'.*.*myurl2.com' or @domain~'.*.*myurl3.com']//div[@style~'color:.*Red.*']
- Validate
- NotExists
- MyObjectFromRepository
This test passes if whether repository item exists or does not exist. If I change the validation to a simpler object from the repository, like an element I just recorded, NotExist and Exist work as expected. Am I doing something wrong in my RanoreXPath? I'm confused because I'd expect 'Highlight Element' and the validation run to be consistent.
Thanks.