Really slow object recognition (WinForms10)

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Posts: 6
Joined: Thu Apr 25, 2019 2:32 am

Really slow object recognition (WinForms10)

Post by julez90 » Tue Apr 28, 2020 11:47 am

Hi Guys,

i'm trying to automate a commercial application (listed as 32bit application in task manager) which contains WindowsForms ui elements.

By trying to identify a button it seems that the reason for consuming much time for it is that there are many containers which has to be go through.
It takes 1.7 minutes to identifiy this single button with the given ranorex xpath.

In the user guide i've learned that I should create more detailed xpath expressions to increase execution speed. But it seems the xpath is already detailed enough?

- Windows Server 2016 (VMWare) (-> Intel Xeon Gold 6154 @ 3 Ghz, 8 Cores / 8 GB RAM / 64bit system)
- Windows 10 64bit (Workstation)
- Ranorex Version: 9.3.1

In the ranorex report I got also a warning which i've also attached as screenshot.

Is there something more I can do or is the structure of the AUT just not suited for automation?

Thanks in advance!

Best regards
(598.43 KiB) Downloaded 96 times
screenshot_winforms.png (18.62 KiB) Viewed 859 times
Last edited by julez90 on Thu Apr 30, 2020 10:56 am, edited 1 time in total.

User avatar
Ranorex Guru
Ranorex Guru
Posts: 7174
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Really slow object recognition (WinForms10)

Post by odklizec » Wed Apr 29, 2020 7:05 am


Could you please post a Ranorex xpath of an element, you are experiencing a problem? Thanks.

The snapshot you posted, contains many invalid elements, which means they were already not available at a time of capturing the snapshot. Eventually, Ranorex experienced a problem while reading these elements.

Could you please examine and eventually post here Ranorex logs for given solution and Ranorex Spy? You can find them in %MyDocuments%\Ranorex\Logs? Ideally, delete existing logs belonging both to solution and Spy. Then first run the the solution up to the point, where it takes too long to find an element. Once the element is found (after a long delay), skip the rest of test. Then go to Spy and try to create a snapshot of the problematic element/entire app. Then collect both logs and new snapshot and post them here. Thanks.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Posts: 6
Joined: Thu Apr 25, 2019 2:32 am

Re: Really slow object recognition (WinForms10)

Post by julez90 » Wed Apr 29, 2020 5:29 pm

Hi odklizec,

thank you for your reply.

- I've installed the AUT on my local machine now (Windows 10 64bit as you can see in Snapshot)

- The tracking of the ui element does take more time than finding it during test execution

Ranorex Xpath - Example:
/form[@controlname='frmMain']/container[@controlname='mainControl']/container[@controlname='windowDockingArea4']//container[@controlname='panel2']/container[@controlname='ContentLayout']/container[@caption='' and @controltypename='WidgetContainer' and @instance='1']/?/?/container[@controlname='BackgroundPanel.ClientArea']/container[@controlname='PaddingPanel']/container[@controlname='LayoutPanel']/container[@controlname='WidgetActionButtons']/container[@caption='' and @controltypename='ActionButton' and @instance='2']//button[@controlname='Button']
Explaination to Attachements:

- I've openend the AUT and tracked the button which take longe time to track (~ 1.5 min)

- I've executed one simple test which is starting the AUT and clicking on the button. After that i skipped, opened Ranorex Spy Tool and created a snapshot of the entire application

Ranorex Spy Log (file was "too big" to upload here in forum): ... y.log?dl=0

Thank you in advance!

Best Regards
(624.88 KiB) Downloaded 82 times
(930.96 KiB) Downloaded 80 times
(14.21 KiB) Downloaded 84 times

Posts: 20
Joined: Wed Sep 18, 2019 9:19 am

Re: Really slow object recognition (WinForms10)

Post by foals11 » Thu Apr 30, 2020 7:30 am


Have you added your application to the whitelist?
Whitelist: ... telisting/

I had a similar issue, in my case it helped to install the .Net Framework 4.7.2 SDK.
You can download the SDK under the following link: ... installer


Posts: 6
Joined: Thu Apr 25, 2019 2:32 am

Re: Really slow object recognition (WinForms10)

Post by julez90 » Thu Apr 30, 2020 10:46 am

Hi foals11,

yes the AUT is already added to the whitelist.

I will try installing the .NET Framework 4.7.2 SDK. My actual version is 4.6.2 SDK.

Best Regards