Wait for image to appear on screen

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
david.rubio
Posts: 6
Joined: Mon Oct 06, 2014 12:32 pm

Wait for image to appear on screen

Post by david.rubio » Mon Oct 06, 2014 12:41 pm

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

User avatar
testautomator
Posts: 67
Joined: Fri Oct 25, 2013 6:37 am
Location: Bangalore, India

Re: Wait for image to appear on screen

Post by testautomator » Wed Oct 08, 2014 7:09 am

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?

david.rubio
Posts: 6
Joined: Mon Oct 06, 2014 12:32 pm

Re: Wait for image to appear on screen

Post by david.rubio » Wed Oct 08, 2014 9:10 am

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?

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Wait for image to appear on screen

Post by krstcs » Wed Oct 08, 2014 1:34 pm

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.
Shortcuts usually aren't...

User avatar
testautomator
Posts: 67
Joined: Fri Oct 25, 2013 6:37 am
Location: Bangalore, India

Re: Wait for image to appear on screen

Post by testautomator » Thu Oct 09, 2014 6:22 am

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