Validate Image

Ranorex Studio, Spy, Recorder, and Driver.
Posts: 12
Joined: Tue Oct 15, 2013 1:50 pm

Validate Image

Post by dariof » Fri Oct 25, 2013 9:31 am

can I check if a screen doesn't contain a picture?
In the Validate action I only found "ContainsImage". I would need to find "NotContainsImage".


User avatar
Support Team
Site Admin
Site Admin
Posts: 12174
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

Re: Validate Image

Post by Support Team » Tue Oct 29, 2013 4:58 pm


Why do you don't use the "Validate.ContainsImage" action in order to check if it picture isn't contained in the screen?
The method will return false if the picture isn't contained in the screen, so you could "validate" the outcome of the action. For more information about the action please see: ContainsImage Method.


Posts: 20
Joined: Fri Feb 22, 2013 7:50 pm

Re: Validate Image

Post by Alena » Wed Oct 30, 2013 8:07 pm

You can simply open properties of your ContainsImage validation action and set "Report Level on Failure" to Success and "Report level on Success" to Failure. This way if Contains -> will be reported as Failure, and if Not contains -> will be a Success.