Setting Runtime Parameters of Spy Selection

Ranorex Spy, Recorder, and Studio.
this_is_ridiculous
Posts: 27
Joined: Tue Apr 27, 2010 10:33 pm

Setting Runtime Parameters of Spy Selection

Post by this_is_ridiculous » Fri Nov 16, 2012 2:17 pm

Hello.

I have an issue with my current project. When using the 32 bit version of Spy on x64 Windows 2003 on one of generic Windows dialogs (that belong to the product, for example OpenFile or SaveFile) the Spy crashes and hangs the whole system. The product is of x86 CPU architecture.

This happens when detecting controls with the Spy, as well as when our framework executes. However everything is fine when detecting controls on the same window of product using x64 vesrion of Spy.

And my question is the next: is there any way to force Ranorex Runtime to use recognition techniques of x64 version of Spy disregarding the actual process architecture (on x64 version of Windows of course :) )?

Thanks in advance.
Artem.

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

Re: Setting Runtime Parameters of Spy Selection

Post by Support Team » Fri Nov 16, 2012 6:25 pm

Hello,

Which Ranorex version are you using?
Please install our latest version 3.3.4 of Ranorex (if it is not up-to-date) from our Download Archive.
Install Ranorex via setup.exe which is included in the zip-compressed file 'Ranorex-3.3.4.zip in order to install all prerequisites of Ranorex as well.

Ranorex handles testing of 32/64 bit based applications on 64 bit operating systems automatically.
More information for 64-bit platforms can be found in our User Guide. You could use the 64-bit stand-alone Ranorex Spy to detect controls.

Regards,
Markus (T)
.
Image

this_is_ridiculous
Posts: 27
Joined: Tue Apr 27, 2010 10:33 pm

Re: Setting Runtime Parameters of Spy Selection

Post by this_is_ridiculous » Fri Nov 16, 2012 7:04 pm

Hi!
Thanks for your reply, however this is not our problem.
I think I was not accurate enough with my question. I will try to explain it in more depth.

We have developed our custom solution for automation that leverages Ranorex Api. We use VS2010/Vs2012 for development and TFS for CI and latest version of Ranorex. Basicaly our solution consists of 1 executable and a tonn of Dlls. Those Dlls are containers for test scenarios. Executable project in runtime reflects all of them and extracts all of the test scenarios that are later executed one by one in automatic way. Our test scenarios do heavy usage of GDI plugin. And this system is automatically built by our TFS and uploaded to shared location and later is automatically deployed to virtual machines for execution. So we really do not control the workflow here and changing settings of spy by hand is not an option here. building the solution in x64 mode is not an option as well because we have to support both architectures of product. Testing is performed in such combinations:

1) x64 windows -> x64 product
2) x86 windows -> x86 product
3) x64 windows -> x86 product

Background of a problem:
We have discovered that when using the last combo for tests (specifically on Windows 2003 x64 and 32 bit product) and using 32 bit Spy hangs everything. The Dialog is generic open file dialog and the actual control is a combobox for filename. So when just detecting this control with 32 bit Spy something goes wrong and everything inside OS stops responding. However when using 64 bit Spy on the same combo everything is just fine.

So the question is: Is it possible to force spy 64 bit in runtime programatically on 32 bit version of product?
for example the same way as adding classes to GDI Capture. If yes, how? :)

Will be very grateful for any help.

Artem.

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

Re: Setting Runtime Parameters of Spy Selection

Post by Support Team » Mon Nov 19, 2012 5:53 pm

Hello,

Have you already set your 'Target CPU' to 'Any Processor' in the properties of your project?
Please try to disable the '32/64-bit Bit Bridge' via 'Global Settings' in Ranorex Studio.

Regards,
Markus (T)
.
Image

this_is_ridiculous
Posts: 27
Joined: Tue Apr 27, 2010 10:33 pm

Re: Setting Runtime Parameters of Spy Selection

Post by this_is_ridiculous » Mon Nov 26, 2012 10:13 am

Hello.

"Have you already set your 'Target CPU' to 'Any Processor' in the properties of your project?" <----- Yes

"Please try to disable the '32/64-bit Bit Bridge' via 'Global Settings' in Ranorex Studio." <-------- we did this in spy. However if still using 64 bit spy on that window the behavior is OK. Is there any way do the same but with code only? So we could set the preferred Spy behavior on demand from code but not touching the UI of RxStudio or Spy themselves.

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

Re: Setting Runtime Parameters of Spy Selection

Post by Support Team » Mon Nov 26, 2012 1:08 pm

Hello,

You could use the following code to disable BitBridge:
Configuration.Current["plugins.win32.enablebitbridge"] = false;
Ranorex global settings are stored in the following file:
%systemdrive%\users\%username%\AppData\Roaming\RanorexConfig3.xml

Regards,
Markus (T)
.
Image

this_is_ridiculous
Posts: 27
Joined: Tue Apr 27, 2010 10:33 pm

Re: Setting Runtime Parameters of Spy Selection

Post by this_is_ridiculous » Tue Nov 27, 2012 11:27 am

Hi!

Thanks for the reply. I'll try it and will let you know the results shortly.

Cheers!
Artem.