Ranorex uses the EnsureVisible operation to bring a UI element into view before acting. If Ranorex cannot make the element visible or bring its application window to the foreground, the action may fail, or the element may appear displaced, empty, or outside the visible area.
Ranorex cannot bring the application window to the foreground
An EnsureVisible action may fail when Ranorex cannot bring the window containing the target element to the foreground. This commonly occurs when Ranorex and the application under test (AUT) run with different privilege levels.
Close Ranorex Studio and the AUT, and then restart both with the same privilege level. If the AUT requires administrator privileges, run Ranorex Studio with administrator privileges as well.
The AUT starts with elevated privileges
If the AUT is started with a Run application action and requires elevated privileges:
- In Ranorex Studio, open Settings.
- Select Advanced.
- Enable Use UiaLauncher to elevate privileges for processes started by tools.
- Restart the AUT and rerun the test.
This setting starts processes launched by Ranorex tools with elevated administrative privileges. See Advanced Settings and Configurations.
Start the AUT with Ranorex UiaLauncher
If you start the AUT from the command line, you can use Ranorex UiaLauncher:
- Open a command prompt.
- Navigate to the Ranorex Studio installation folder.
-
Run and replace
<path to application>with the path to the AUT executable.Ranorex.UiaLauncher32.exe <path to application>