Test build in WinXP and fail run in Windows 7

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
dcfweb
Posts: 2
Joined: Wed Sep 15, 2010 11:22 am

Test build in WinXP and fail run in Windows 7

Post by dcfweb » Wed Sep 15, 2010 11:37 am

Hi,

I have a couple of test made in Ranorex on a PC with Windows XP. Now that I have upgraded the OS to Windows 7 and I'm trying to run the same tests and they fail.
The tests requires an image comparison and I realised (using the Ranorex Spy Tool) that there are differences in the Form sizes due to new themes in Windows 7.

Let's say there is a Form1 and when I launch the application and track with Ranorex Spy I get the following sizes:

Windows XP: 1024/768
Windows 7 : 1032/772

I am validating the window size and it fails. How can I fix overcome this situation.
Thanks.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Test build in WinXP and fail run in Windows 7

Post by Support Team » Wed Sep 15, 2010 12:33 pm

Hi,

Sorry but the only way to overcome this issue is to record the test again. Because as you said, the User Interface in Win7 and WinXP is different. Therefore the image comparison will always fail. The only thing you can try is to lower the similarity of the image comparison.

Regards,
Peter
Ranorex Team

dcfweb
Posts: 2
Joined: Wed Sep 15, 2010 11:22 am

Re: Test build in WinXP and fail run in Windows 7

Post by dcfweb » Wed Sep 15, 2010 4:56 pm

Thanks for the answer.

Anyway I got a workaround to avoid this situation in the future. The solution is to validate the image partially, considering also that the window object is restored, i.e. it has the size defined in the visual studio.

Regards

dimabs
Posts: 7
Joined: Thu Mar 24, 2011 5:49 pm

Re: Test build in WinXP and fail run in Windows 7

Post by dimabs » Tue Apr 05, 2011 6:16 pm

In my case, test created in XP do not work on Windows7, and seems like it happens if I'm accessing the object using descriptive programming. For example, if I have an object in repository, it is found during the run-time, if I copy object's path and use it directly from the code, I get an exception. And again, it was working in Win XP

Please advise,
Dima

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Test build in WinXP and fail run in Windows 7

Post by Support Team » Wed Apr 06, 2011 9:57 am

Hi,

there didn't occur any changes within the "find" functionality.
So mybe the path you've copied is not valid.
Try to track the RanoreXPath of the adapter you want to automate with Ranorex Spy and copy it directly from Spy.

If that won't work can you please provide us the code you use and addidtionally the corresponding snapshot file covering your application under test.
Following link will show you how to generate a snapshot file:
http://www.ranorex.com/support/user-gui ... files.html
Can you also post the exceptions log, when getting the exception?


Regards,
Tobias
Support Team

dimabs
Posts: 7
Joined: Thu Mar 24, 2011 5:49 pm

Re: Test build in WinXP and fail run in Windows 7

Post by dimabs » Fri Apr 08, 2011 5:55 pm

Hello,

It seems like the path is correct. I already provided support with requested information. Besides, execution on Windows7 is extremely slow, is there any setting that could improve that?

Thank you,
Dima

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Test build in WinXP and fail run in Windows 7

Post by Support Team » Mon Apr 11, 2011 1:00 pm

Hello Dima,

up to now we didn't see any difference between XP and Windows 7 in our test automation programs. Also the execution speed was the same.

It might be that your Windows 7 computer is slow altogether or at least not fast enough for Windows 7.
It might be that you have some SW installed, like Antivirus SW, that slows it down.

In the parallel support emails we have exchanged we weren't able to pin down an error behavior.

Please be aware that a // in

Code: Select all

*/body//iframe[@id='oLeftPaneContent']//span[@innertext~'Smoke']
means all elements are search. This might take some time and if you say that your machine is slow, you probably have to increase the search time for the element.

For a repository entry the search time can be changed in the properties of the repository entry.
In code you can provide the search time as parameter to the FindSingle method or you can change the static DefaultSearchTime of a Ranorex adapter class.

Regards,
Roland
Ranorex Support Team