Object recognition may be slow in WinForms applications running on modern .NET, for example, .NET 6 or later. If Ranorex Spy takes a long time to track WinForms elements or populate the element tree, configure the WinForms.Core plugin to use the legacy serialization mechanism.
Use the legacy serialization mechanism
To change the serialization mechanism:
- In Ranorex Studio, open Settings.
- Select Plugins.
- Expand WinForms.Core.
- Set Use a legacy serialization mechanism to True.
- Select Apply or OK.
- Restart the application under test (AUT).
- Track the affected elements or run the test again to determine whether recognition performance has improved.
If object recognition remains slow, collect WinForms tracing logs and provide them to Ranorex Support for further investigation. For instructions, see Collect WinForms Object Recognition Tracing Logs.
For general performance issues that are not limited to WinForms applications, see Troubleshoot SloTroubleshoot Slow Object Recognitionw Object Recognition.
For problems in which Ranorex cannot identify the required WinForms elements or displays the wrong element representation, see Troubleshoot Object Recognition in .NET WinForms Applications.