Forum Discussion
The reason for the slow performance is most likely because, with the addition to the UI Automation in his project, he is basically telling TestComplete to access ALL objects of matching classes using that methodology, not just the ones he needs for his report. The better solution is to take his time and map each component type he needs and ONLY those he needs with the UI Automation plug in.
Of course, thjis original post is 5 years old... that's several versions of TestComplete ago... so, it's entirely likely that the slowness has been resolved.
If you are having a specific problem with TC 12 with this feature, it might be best to address that separately.
Thanks for the reply Robert.
Yes, I saw that the original post was old but, figured I would see if there was an answer.
I am using TC 12.x. In my situation, I have simple window (WinFormsObject) with a grid in it that I can only access with UIA. It currently has about 2600 rows. When using the Object Browser, TC waits forever. Looking at the Task Manager processes, I see my app memory usage just keep climbing as TC tries to read the grid. I am guessing Object Browser is trying to fill in with all the info in the grid. I have been able to get the Object Browser to expand a bit and show the actual grid under the main window but it is hit and miss. Not sure why it has shown the sub-objects a few times but most other times just sits and spins.
I will open a new thread on my issue after I dig into things a bit more. Thanks for your reply though.
- tristaanogre9 years agoEsteemed Contributor
Natively, TestComplete supports a couple of grid type Winforms Objects.
HEre's the full lost of supported types:
Supported Microsoft ControlsWindows Forms
Controls Library Classes CheckBox .NET Framework v. 2.0, 3.0, 3.5, 4.0, 4.5.x, 4.6, 4.6.1 System.Windows.Forms.CheckBox DataGrid .NET Framework v. 2.0, 3.0, 3.5, 4.0, 4.5.x, 4.6, 4.6.1 System.Windows.Forms.DataGrid DataGridView .NET Framework v. 2.0, 3.0, 3.5, 4.0, 4.5.x, 4.6, 4.6.1 System.Windows.Forms.DataGridView DomainUpDown .NET Framework v. 2.0, 3.0, 3.5, 4.0, 4.5.x, 4.6, 4.6.1 System.Windows.Forms.DomainUpDown LinkLabel .NET Framework v. 2.0, 3.0, 3.5, 4.0, 4.5.x, 4.6, 4.6.1 System.Windows.Forms.LinkLabel Main menus and context menus .NET Framework v. 2.0, 3.0, 3.5, 4.0, 4.5.x, 4.6, 4.6.1 System.Windows.Forms.ContextMenuStrip
System.Windows.Forms.MenuStripNumericUpDown .NET Framework v. 2.0, 3.0, 3.5, 4.0, 4.5.x, 4.6, 4.6.1 System.Windows.Forms.NumericUpDown PropertyGrid .NET Framework v. 2.0, 3.0, 3.5, 4.0, 4.5.x, 4.6, 4.6.1 System.Windows.Forms.PropertyGrid RadioButton .NET Framework v. 2.0, 3.0, 3.5, 4.0, 4.5.x, 4.6, 4.6.1 System.Windows.Forms.RadioButton Strip StatusBar (StatusStrip) .NET Framework v. 2.0, 3.0, 3.5, 4.0, 4.5.x, 4.6, 4.6.1 System.Windows.Forms.StatusStrip Strip Toolbar (ToolStrip) .NET Framework v. 2.0, 3.0, 3.5, 4.0, 4.5.x, 4.6, 4.6.1 System.Windows.Forms.ToolStrip Rather than using UI Automation, you MIGHT be able to assign your component to one of these in the Object Mapping for your project. That's a potential solution rather than using UI Automation.
- prateeksharma9 years agoOccasional Contributor
Hi BkNutson,
Yes after mapping a grid object class, testcomplete able to map grid row column objects, I checked and found it worked if you are using recording feature of test complete, but if you are use to work with dynamic programming for example spy the object with TC object spy and uses Find, FindChild, FindEx methods to find a objects it doesn't work, Always TC freezes when I tried to use object spy So for the time-being I used whole absolute path to perform operations on my objects.
- bknutson9 years agoContributor
I removed my reference to the object class in the 'UI Automation' section. With that off, the Object Browser responds like it should and doesn't 'freeze'. I can't drill down in Object Browser on individual cells but, I don't really need to anyway.
I can still use the methods for the grid to access the cells through scripting. I am not sure now why I even put that window class into the UI Automation setup area in the first place.
I will leave it out and see if I run into any issues but I think for my case, I should be fine. Thanks- tristaanogre9 years agoEsteemed Contributor
bknutson wrote:
I removed my reference to the object class in the 'UI Automation' section. With that off, the Object Browser responds like it should and doesn't 'freeze'. I can't drill down in Object Browser on individual cells but, I don't really need to anyway.
I can still use the methods for the grid to access the cells through scripting. I am not sure now why I even put that window class into the UI Automation setup area in the first place.
I will leave it out and see if I run into any issues but I think for my case, I should be fine. ThanksThat's actually standard practice for grid components, anyways. Some grids expose the individual Cell objects, others you need to use the native properties to access individual cells and rows. UI Automation, MSAA, and other similar technologies appear to do a real-time scan of the object and retrieves the information that way, each time you access the object so, if there are a LOT of objects, it will take a while. I wouldn't say TC is "frozen", just not responding because it's busy. :)
Glad it's working out for you!