Hyper V machine cant extract elements from repository

Ranorex Spy, Recorder, and Studio.
touel
Posts: 4
Joined: Tue Feb 22, 2011 4:39 pm

Hyper V machine cant extract elements from repository

Post by touel » Tue Feb 22, 2011 5:08 pm

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.

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

Re: Hyper V machine cant extract elements from repository

Post by Support Team » Tue Feb 22, 2011 8:59 pm

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

touel
Posts: 4
Joined: Tue Feb 22, 2011 4:39 pm

Re: Hyper V machine cant extract elements from repository

Post by touel » Wed Feb 23, 2011 9:43 am

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

touel
Posts: 4
Joined: Tue Feb 22, 2011 4:39 pm

Re: Hyper V machine cant extract elements from repository

Post by touel » Wed Feb 23, 2011 3:55 pm

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 ?

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Hyper V machine cant extract elements from repository

Post by Ciege » Wed Feb 23, 2011 4:39 pm

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?
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

touel
Posts: 4
Joined: Tue Feb 22, 2011 4:39 pm

Re: Hyper V machine cant extract elements from repository

Post by touel » Wed Feb 23, 2011 4:58 pm

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.

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Hyper V machine cant extract elements from repository

Post by Ciege » Wed Feb 23, 2011 5:11 pm

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.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...