Looping while waiting for an image

Class library usage, coding and language questions.
Posts: 29
Joined: Fri Oct 21, 2011 6:09 pm

Looping while waiting for an image

Post by Mourasman » Thu Dec 22, 2011 6:07 pm

Hey guys,

I have a situation where I need to click on a certain element until a certain screenshot is found, much like the "Validate.ContainsImage", but since the "ContainsImage" method doesn't return a value I need a workaround to "wait" for that image. Has anyone done this before?


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

Re: Looping while waiting for an image

Post by Support Team » Thu Dec 22, 2011 6:25 pm


You could use the TryFindSingle method to validate if the image is available. This method returns you a boolean and you could search for this element till it is found for example in a while loop.
http://www.ranorex.com/Documentation/Ra ... Single.htm

Ranorex Team