Page 1 of 1

Test build in WinXP and fail run in Windows 7

Posted: Wed Sep 15, 2010 11:37 am
by dcfweb
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.

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

Posted: Wed Sep 15, 2010 12:33 pm
by Support Team
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

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

Posted: Wed Sep 15, 2010 4:56 pm
by dcfweb
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

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

Posted: Tue Apr 05, 2011 6:16 pm
by dimabs
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

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

Posted: Wed Apr 06, 2011 9:57 am
by Support Team
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

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

Posted: Fri Apr 08, 2011 5:55 pm
by dimabs
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

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

Posted: Mon Apr 11, 2011 1:00 pm
by Support Team
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