Page 1 of 1

Hyper V machine cant extract elements from repository

Posted: Tue Feb 22, 2011 5:08 pm
by touel
By using Ranorex spy, I have added elements to it, and created my code.

Now I run this code on a Hyper V machine, and here comes the interesting part. Sometimes the code runs perfectly, other times, it cannot find something so basic as a button and fails. It's quite annoying to se these faults, so now I wanna know wheter this got something to do with Hyper V, or does my repository just lose connection with my Hyper V machine ?

Btw this is what I have done so far.... sometimes I use the whole path of a button to access it in the code, other times i change the cache from true to false....

But this is not enough. I still se the program crashing.

Re: Hyper V machine cant extract elements from repository

Posted: Tue Feb 22, 2011 8:59 pm
by Support Team
Hello,

Hyper V or not shouldn't make a difference.

When you are running a script from another machine, the screen resolution could make a difference, if you use relative coordinates.

Does the script always run on the machine where you recorded/programmed it?

regards,
Roland
Ranorex Support Team

Re: Hyper V machine cant extract elements from repository

Posted: Wed Feb 23, 2011 9:43 am
by touel
Well I am using Spy(tracks on) to add elements to my repository, so I dont use relative coordinates, and neither have the resolution of the screen been a problem.

I always create a exe file of my coding and run it on the hyper V virtual machine

Re: Hyper V machine cant extract elements from repository

Posted: Wed Feb 23, 2011 3:55 pm
by touel
Basically the problem I have, is that I get this message: "Failed to find item xxxxx, within the specified timeout". Sometimes when I run my exe file, it all run just fine, other times it fails. why ?

Re: Hyper V machine cant extract elements from repository

Posted: Wed Feb 23, 2011 4:39 pm
by Ciege
What kind of AUT is it?
How long is "XXX"?
Can you share the code that you are using to do the searches?
Is the virtual machine always logged in with a proper desktop available for GUI testing?

Re: Hyper V machine cant extract elements from repository

Posted: Wed Feb 23, 2011 4:58 pm
by touel
what do u mean by AUT ?

by xxxx, I mean buttons, radiobuttons..

This is a code example which sometimes runs, and other times fails.. dont know why:

repo.Service_channel.FormXProtect_Service_Channel.ButtonTypical.Click();

//repo is the instance to my repository in Spy.

I have noticed, that sometime I have a "trust relationship" problem with the domain, where the virtual machine is on. I change it to a workgroup and back again. That helps sometime.

Re: Hyper V machine cant extract elements from repository

Posted: Wed Feb 23, 2011 5:11 pm
by Ciege
AUT - Application Under Test. Is it a web app (I.E.) or a client - server app (.NET, other)?

OK, I read that line wrong. I guess I wanted to ask, how long is the specified timeout that it is failing in? Maybe the AUT is not in a ready state and the element does indeed not exist yet, or maybe you have a very deep AUT and the timeout is reached before you actually make it to the element.

Maybe put some verification before the click to verify the element is valid and ready before actually performing the click. Possibly also put other validation in to make sure your AUT is in a valid readystate before trying to click an element. If you are running faster than your AUT can keep up you will get these "random" failures in your testing, especially if you are running in a virtualized environment that is slower than your development environment.