Really slow object recognition (WinForms10)

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
julez90
Posts: 3
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?

System:
- 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
Attachments
Snapshot.rxsnp
(598.43 KiB) Downloaded 3 times
screenshot_winforms.png
screenshot_winforms.png (18.62 KiB) Viewed 225 times
Last edited by julez90 on Thu Apr 30, 2020 10:56 am, edited 1 time in total.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6181
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

Hi,

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

julez90
Posts: 3
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.

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

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

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

Snapshot_EntireApplication_AfterSkippingTest:
- 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):
https://www.dropbox.com/s/z8bejqb9mtyvb ... y.log?dl=0


Thank you in advance!


Best Regards
Attachments
Snapshot_EntireApplication_AfterSkippingTest.rxsnp
(624.88 KiB) Downloaded 4 times
Snapshot_TrackedButton.rxsnp
(930.96 KiB) Downloaded 4 times
UITests_PROFILE.log
(14.21 KiB) Downloaded 2 times

foals11
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

Hi,

Have you added your application to the whitelist?
Whitelist: https://www.ranorex.com/help/latest/ran ... 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: https://dotnet.microsoft.com/download/d ... installer

regards

julez90
Posts: 3
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