How to validate object not found then write to report as failed. i just tried various code snippet from forum but not able to make it work.
Thank you,
Beginner
How to validate
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to validate
Just add a "NotExists" validation in the Recorder. See following topic in the Ranorex User Guide:
http://www.ranorex.com/support/user-gui ... rding.html
Alternatively, in code you can use the Validate.NotExists method on the repository item info object as explained in the Ranorex User Guide code examples:
http://www.ranorex.com/support/user-gui ... html#c3203
The last argument (bool exceptionOnFail) of that method lets you specify whether Ranorex will throw an exception or continue execution if the validation fails.
Regards,
Alex
Ranorex Team
http://www.ranorex.com/support/user-gui ... rding.html
Alternatively, in code you can use the Validate.NotExists method on the repository item info object as explained in the Ranorex User Guide code examples:
http://www.ranorex.com/support/user-gui ... html#c3203
The last argument (bool exceptionOnFail) of that method lets you specify whether Ranorex will throw an exception or continue execution if the validation fails.
Regards,
Alex
Ranorex Team