Issues with slow object recognition(?) of WinForm objects

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
JimLin
Posts: 38
Joined: Mon Jun 02, 2014 4:23 pm

Issues with slow object recognition(?) of WinForm objects

Post by JimLin » Thu Nov 13, 2014 5:16 pm

I hope the title describes the issue I have well enough. What I mean by ‘slow recognition’ is that on screens constructed using WinForms, the mouse takes a long time to react, get to each action point and then complete the action. On a screen constructed using VB6, the reaction timings and actions are much, much quicker.

I have an ever expanding set of test cases for testing a desktop app. In this app, some of the screens are prebuilt using VB6 and some are created 'On the fly' using WinForms which reference an XML schema (I'm not a developer but this is how it's been described to me). The problem is that Ranorex takes a lot longer to locate the WinForms objects than it does to locate V6 objects

I created a new project and created basic tests for each type of screen and the WinForms screen is still slow.

Basic WinForm Screen test:
Ranorex basic WinForms test.png
Ranorex basic WinForms test.png (142.33 KiB) Viewed 1424 times
Basic VB6 Screen test:
Ranorex basic VB6 test.png
Ranorex basic VB6 test.png (119.25 KiB) Viewed 1424 times
I can't work out what is causing the issue, apart from the fact they are made with two different technologies. Even using 'set' for the values and tick boxes on the WinForms pages, things don't get any faster I have tried all the methods available in Ranorex for speeding up playback, such as ‘Turbo’, Global settings and adding the mouse move setting in the Program.cs file.

The xPath structures are fundamentally different, but do you think they are they cause of the problem? I have tried changing them in a limited way, but this hasn’t improved things.

Examples of a WinForm xPath:
/form[@controlname='frmPROPOSER.tst']/?/?/container[@controlname='grpIndividual']/container[@controlname='optAlwaysResidYN']/?/?/radiobutton[@controlname='radYes']

/form[@controlname='frmPROPOSER.tst']/?/?/container[@controlname='grpHave']/checkbox[@controlname='chkProsecutions']
Updated from Ranorex Support Team for better readability

Example of a VB6 xPath
/form[@title='Driver']/?/?/element[@controlid='2']/element[@controlid='10']/?/?/radiobutton[@accessiblename='Male']

/form[@title='Driver']/?/?/element[@controlid='26']/?/?/checkbox[@accessiblename~'^Any\ County\ Court\ Judgemen']
Updated from Ranorex Support Team for better readability

Not being able to improve this situation will be a major concern, as the majority of the screens we will be testing are made using WinForms and so the tests will get slower and slower to run.

I am currently running a Server 2008r2 VM on a Windows 7 desktop with 3gb of memory. The Ranorex Studio version I am using is 5.2.0

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Issues with slow object recognition(?) of WinForm objects

Post by Support Team » Fri Nov 14, 2014 3:23 pm

Hello JimLin,

Please send a mail regarding your issue to [email protected]. We would like to analyze your issue in more detail.

Thank you in advance.

Regards,
Robert
.
Image

JimLin
Posts: 38
Joined: Mon Jun 02, 2014 4:23 pm

Re: Issues with slow object recognition(?) of WinForm objects

Post by JimLin » Fri Nov 14, 2014 4:04 pm

Hi Robert, I have sent the email as requested.

JimLin
Posts: 38
Joined: Mon Jun 02, 2014 4:23 pm

Re: Issues with slow object recognition(?) of WinForm objects

Post by JimLin » Wed Nov 19, 2014 11:07 am

I have worked through this issue thanks to the help from Ranorex Support and thought I would post our findings here in case it helps someone else.

From Ranorex support
Please try to avoid double slashes within your RxPaths, this should increase the object recognition process.
/form[@controlname='frmPROPOSER.tst']//combobox[@controlname='cboFTEmpType']/text[@controlid='1001']

/form[@controlname='frmPROPOSER.tst']/?/?/container[@controlname='grpOccupation']/combobox[@controlname='cboFTEmpType']/text[@controlid='1001']
My reply
I have amended the xPaths as you suggested and on the whole it has helped significantly. There are a couple of screens where the object recognition is still really slow. For example:

The Property screen – This is probably the worst screen, as there are 15 tick boxes, all of which are really slow to ‘tick’.

The xPaths for the tick boxes are:
/form[@controlname='frmPROPERTY.tst']/container[@controlname='Window']/?/?/checkbox[@controlname='chkRiver']
The /?/?/ between container and checkbox are set by default and have not been changed by me. Even with them, the recognition is very slow.

The xPaths for the comboboxes are:
/form[@controlname='frmPROPERTY.tst']//combobox[@controlname='cboPropertyType']/text[@controlid='1001']
Changing the double slashes to /?/?/ speeds up the recognition time enormously.

I have tried using mouse clicks and also ‘Setting’ the tick value (Checked/Unchecked) and both are as slow as each other.
Reply from Ranorex support
You could try to specify the element as shown below:
/form[@controlname='frmPROPERTY.tst']/container[@controlname='Window']/container[@controlname='grpProperty']/checkbox[@controlname='chkRiver']
This is the last thing you could do. We reached the limit of path improvement, due to the structure of the RxPath