Page 1 of 1

Wait for image to appear on screen

Posted: Mon Oct 06, 2014 12:41 pm
by david.rubio
Hi,

I would like to know if there is any possible way of waiting for an image to appear on the screen. The problem is: I need to wait for some stuff to start and validate and when that happens, a button becomes active. The time it takes is NOT always the same and it may vary between 5 and 40min so an active wait is not possible in this case.

The solution I'm looking for MUST be "Image based" because the software I'm automating is on Linux and I'm connecting to it using VNC, so no xPath at all.

My project in Ranorex is C#

Thanks in advance for any help you may provide

David

Re: Wait for image to appear on screen

Posted: Wed Oct 08, 2014 7:09 am
by testautomator
Hi David,
Have you tried using that image recognition with a timed loop? Create your own wait, use stopwatch. Put the maximum time possible and keep the loop running until it finds the image.
And, why no xpath in VNC?

Re: Wait for image to appear on screen

Posted: Wed Oct 08, 2014 9:10 am
by david.rubio
Hi testautomator,
I did yesterday what you suggest now and it works. The timed loop combined with ContainsImage method.

When I connect to the SUT (Linux) via VNC all I get is a big image which I scan looking for the things I want to click, type into, etc all using image based recognition. Correct me if I'm wrong, but one cannot drill down further than the "root" xPath element which contains the VNC screen, right?

Re: Wait for image to appear on screen

Posted: Wed Oct 08, 2014 1:34 pm
by krstcs
David, that is correct. VNC does not produce a DOM structure, only an image, so all Ranorex can see is the image. XPath won't work inside the view area. Same issue with RDP.

Re: Wait for image to appear on screen

Posted: Thu Oct 09, 2014 6:22 am
by testautomator
Great! But I have great respect for your image based automation!! Man, cant imagine how painful it might me :)
Also, now I get the virtual machine thingy. We have installed Rx on our VMs and spy there too! We never realized that we cant spy from our local machine :P