Ranorex Help Center

How can we help you?

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 .NET Framework 4 (or higher) got installed after Ranorex was already installed and the AUT uses .NET 4.0. Consequently, as the .NET Framework 4 was not present when Ranorex was installed, the Ranorex setup could not install the DLLs required to recognize and automate .NET 4.0 applications.

Solution:

Uninstall Ranorex completely and then re-install Ranorex.

Reason #4:

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 #5:

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 #6:

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 #7:

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>  
    <supportedRuntime version="v4.0" />  
  </startup>  
</configuration>  



.NET WPF

For compatibility with existing tests, Ranorex 5.3+ shows WPF windows twice in its tree; once using the WPF-specific plug-in, another time using UIAutomation. When selecting a specific element, the UIAutomation tree was chosen, although the native WPF plug-in is available and active.

Reason #1:

While selecting an element of a WPF application in the element-tree of Spy, you selected the UIAutomation tree of that application.

Solution:

The preceding sibling of the selected window will identify the same window, but provide the "WpfElement" capability instead of "UiAutomation". When browsing elements in Spy, select elements below the "WpfElement" window.

Reason #2:

Instrumentation of the WPF application has failed, because the application runs on a .NET 3.0 runtime, and .NET 3.5 is not installed.

Solution:

Upgrade the .NET installation to version 3.5. No changes are required for the application under test.

.NET Silverlight

Reason #1:

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 Ranorex Settings.

Browser (Mozilla Firefox, Google Chrome, Apple Safari, Microsoft Internet Explorer)

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

Microsoft Internet Explorer:

UI element identification capabilities for Microsoft Internet Explorer are slow.

Solution:

Please make sure that you have enabled the Ranorex Extension in your Internet Explorer (Manage Add-ons).

Note The "Enhanced Protected Mode" needs to be disabled.


Note The "Internet Explorer Enhanced Security Configuration" has to be disabled for the add-on to work on Windows Server machines.



Image Related Automation or Validation

Reason #1:

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 Advanced Settings dialog.

Geometry Related Issues

Reason #1:

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:

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



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



Reason #4:

You checked the "Run this program as an administrator" in the Compatibility settings of a Ranorex Tool EXE file, e.g. for the RanorexStudio.exe file. Setting this option disables access to Windows 8 UI apps.

Solution:

Do not check the mentioned setting for any of the Ranorex EXE files. Alternatively, if you want to always run the tool using administrator rights, you can create a shortcut to the EXE file and check the "Run as administrator" option in the "Shortcut" -> "Advanced..." settings of the shortcut properties.

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.

Different Display DPI Scaling Values

By default, Microsoft Windows is automatically adapting the DPI scaling value for each of your physical displays connected to your machine. This ensures a uniform experience over all displays, even if the displays have a different physical size.

When using Ranorex, all physical displays have to be set to the same DPI scaling value.

Solution for Windows 8.1

  1. On your Windows 8.1 machine, open the Control Panel and switch to section 'Display'. Do not use the application 'PC settings'.

    Make sure the option 'Let me choose one scaling level for all my Displays' is checked.
    Activating the option 'Let me choose one scaling level for all my Displays'
     
  2. After checking this option, choose the size category you prefer.
    Choosing the scaling size

    Press 'Apply', sign-out and sign-in again to your machine to activate the new settings.

The technology limitation warning should not appear again.

Solution for Windows 10

  1. On your Windows 10 machine, open the Windows start menu and choose 'Settings'.
  2. Click on 'System'.
    The System icon in the Settings window
     
  3. The section 'Display' should be shown automatically – if not, open it manually. 
     
    Make sure that all your physically connected displays have the same setting at 'Change the size of text, apps, and other items'.  
    Move through the list of displays (labelled with numbers) one by one, and check the setting.
    When changing a display value, press 'Apply' before moving on to the next display.
    Customizing the scaling for multiple displays

  4. Once all changes have been applied, you can close the 'Settings' window.

The technology limitation warning should not appear again.