Page 1 of 1

Looping while waiting for an image

Posted: Thu Dec 22, 2011 6:07 pm
by Mourasman
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?

Thanks,
Mourasman

Re: Looping while waiting for an image

Posted: Thu Dec 22, 2011 6:25 pm
by Support Team
Hi,

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

Regards,
Peter
Ranorex Team