General Troubleshooting

This section provides an overview of possible reasons for a limited object recognition with Ranorex tools and recommends ways to correct a malfunction.

.NET WinForms

Ranorex failed to load the assemblies containing the definition of this control. UI element identification capabilities for this control are limited. There might be several reasons for limited support of .NET WinForms based applications or controls:

Reason #1:

The automating process (Ranorex executable) and the automated application (AUT) are not started with the same security rights, i.e. not as the same Windows user.

Solution:

Try starting both applications as the same user.

Reason #2:

Either the automating executable or the AUT are started from a network drive or encrypted folder and consequently do not have the required security rights.

Solution:

Try copying both applications to a folder on your hard disk.

Reason #3:

The controls that cannot be identified are implemented in a mixed-mode EXE file (not DLL). This can be the case with some obfuscating applications or assembly merging utilities that create mixed-mode EXE files. The .NET Framework does not support loading such mixed-mode executables in other processes and that's why Ranorex cannot recognize controls implemented within them.

Solution:

As a workaround, you can try to automate the non-obfuscated version of your application.

Reason #4:

The controls that cannot be identified are implemented in an assembly that targets a particular platform/processor and the automating executable targets a different platform/processor. This can cause problems on 64 bit operating systems, since such assemblies cannot be loaded by the automating process.

Solution:

Try changing the 'Target CPU' (Ranorex Studio) or 'Platform Target' (Visual Studio) option in the automation project settings to match the target of the automated application as described in this section. If you don't know the target CPU/platform of the automated application, first try to change the option to 'Any processor' or 'Any CPU', respectively, then try the remaining options.

Reason #5:

The .NET Framework 4.0 Extended package is needed but not installed. An indication for this problem typically is that controls can correctly be identified by the standalone Ranorex Spy application, but not by the integrated Ranorex Spy or Recorder in Ranorex Studio.The application under test uses the .NET Framework 4.0 and you may get Technology Limitation pop-ups saying that specific assemblies cannot be loaded.

Solution:

Either install the .NET Framework 4.0 Extended or if that is not possible always use the standalone Ranorex Spy and Recorder tools instead of the integrated ones in Ranorex Studio.

Reason #6:

If the application under test is built with the .NET Framework 4.0, a <executableName>.exe.config file (where <executableName> has to be replaced by the name of the Ranorex executable) needs to reside in the same folder as the automating Ranorex executable and it needs to contain the configuration below.

Solution:

Create and add an app.config file with the below content to your project. Make sure that after compiling and when executing the executable there is a <executableName>.exe.config file in the same folder as the Ranorex executable with following content:

<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
    <supportedRuntime version="v2.0.50727"/>
  </startup>
</configuration>

.NET Silverlight

Ranorex is not able to access UI objects inside your Silverlight application.

Solution:

Please make sure that the Windowless property of your Silverlight application is set to 'False'.

Flash/Flex Applications

After activating the Flash/Flex Plug-In for your application using the instrumentation wizard Ranorex is still not able to recognize Flash/Flex elements within your application.

Reason #1

The AllowScriptAccess parameter in the HTML code that loads a SWF file controls the ability to perform outbound URL access from within the SWF file.

Solution:

Set this parameter inside the PARAM or EMBED tag to 'always'.

Reason #2

Your Flash/Flex application was instrumented twice using different versions of Ranorex Flash components.

Solution:

Ensure that only one of the recommended instrumentation approaches for Flash/Flex is used.

Win32 Based Applications

There might be several reasons for limited support of Win32 based applications:

Reason #1:

The automating process is not being run with the required security permissions to access the process under test. UI element identification capabilities for controls in that process are limited.

Solution:

The automating process (Ranorex executable) and the automated application (AUT) are not started with the same security rights, i.e. not as the same Windows user. Ensure that both processes are started with the same rights.

Reason #2:

The automating and the automated process do not have the same bit width and Ranorex was unable to start the 32/64 Bit Bridge. UI element identification capabilities for controls in that process are limited.

Solution:

Please contact Ranorex support team for further assistance.

Reason #3:

The automating and the automated process do not have the same bit width and the 32/64 Bit Bridge is disabled. UI element identification capabilities for controls in that process are limited.

Solution:

Enable the 32/64 Bit Bridge in the General Ranorex Settings.

Browser (Mozilla Firefox, Google Chrome, Apple Safari)

Mozilla Firefox:

UI element identification capabilities for Mozilla Firefox are limited.

Solution:

Please make sure that you have installed and enabled the Ranorex Addon in your Mozilla browser. Please refer to the Mozilla Firefox instrumentation wizard documentation for more information.

Google Chrome:

UI element identification capabilities for Google Chrome are limited.

Solution:

Please make sure that you have installed and activated the Ranorex Extension in your Goggle browser. Please refer to the Google Chrome instrumentation wizard documentation for more information.

Apple Safari:

UI element identification capabilities for Apple Safari are limited.

Solution:

Please make sure that you have installed and activated the Ranorex Extension in your Apple browser. Please refer to the Apple Safari instrumentation wizard documentation for more information.

Image Related Automation or Validation

Ranorex's image based recording ability is limited because the asynchronous dispatching of input events is disabled.

Solution:

If you experience problems when making image based recordings, please enable asynchronous dispatching of mouse and keyboard events using the Recorder's settings dialog.

Geometry Related Issues

Controls being displaced, staying empty, or being scrolled out of view during automation.

Solution:

Set the 'Use Ensure Visible' property of the corresponding repository items (and their parent folders) to 'False' as described in the chapter Repository Item Properties.

Windows Apps (aka Windows 8 UI Apps)

There are a few reasons causing Windows 8 UI based applications not to be recognized correctly:

Reason #1:

Test execution is started using a Ranorex tool and the setting 'Use UiaLauncher to elevate privileges for processes started by tools' ('General Settings' dialog -> 'Advanced' tab) is disabled.

Solution:

Enable the mentioned setting.

Reason #2:

Ranorex is not installed in a secure location.

Solution:

Install Ranorex to 'Program Files' or 'Program Files (x86)'.

Reason #3:

The test executable is not started by a Ranorex Tool.

Solution #1:

Start the test suite using the TestSuiteRunner.

Solution #2:

Use the Ranorex UiaLauncher (<Ranorex Installation Folder>\bin\Ranorex.UiaLauncher32.exe) to start the test executable by passing the executable name as the first argument.

E.g. Ranorex.UiaLauncher32.exe <Solution Folder>\bin\debug\<Project Executable>.exe.

Solution #3:

Add the following lines of code to the Program.cs/Program.vb of the main (executable) project:

C#

if (Ranorex.Core.Util.IsRestartRequiredForWinAppAccess) 
 return Ranorex.Core.Util.RestartWithUiAccess();

VB.NET

If Ranorex.Core.Util.IsRestartRequiredForWinAppAccess Then
	Return Ranorex.Core.Util.RestartWithUiAccess()
End If

Other Software

Running some antivirus or security software might lead to a limited object recognition with Ranorex tools.

Reason #1:

The antivirus or security software blocks certain Ranorex functionality.

Solution:

Add an exception for the appropriate Ranorex process or temporarily switch off the specific security application.