Looping while waiting for an image

Class library usage, coding and language questions.
Mourasman
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?

Thanks,
Mourasman

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Looping while waiting for an image

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

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
.
Image