Page 1 of 1

Really slow object recognition (WinForms10)

Posted: Tue Apr 28, 2020 11:47 am
by julez90
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

Re: Really slow object recognition (WinForms10)

Posted: Wed Apr 29, 2020 7:05 am
by odklizec
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.

Re: Really slow object recognition (WinForms10)

Posted: Wed Apr 29, 2020 5:29 pm
by julez90
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

Re: Really slow object recognition (WinForms10)

Posted: Thu Apr 30, 2020 7:30 am
by foals11
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

Re: Really slow object recognition (WinForms10)

Posted: Thu Apr 30, 2020 10:46 am
by julez90
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