UI automation doesn't work with Telerik grid, even after setting "EnableCodedUITests = true"

3 Answers 614 Views
GridView
Vijayanand
Top achievements
Rank 1
Iron
Vijayanand asked on 26 May 2021, 11:27 AM | edited on 26 May 2021, 11:51 AM

Hi,

We have problem identifying objects on Telerik grids, from UI automation tool. Quite many screens in our application are using Telerik grids. We now are trying UI automation using Ranorex. Most parts are going good, except Telerik grid! Basically, objects inside the grid are not identified as they should.

Found similar discussion at https://www.telerik.com/forums/635401-gridview and we made change as per suggestion, by introducing "EnableCodedUITests = true". However, no good lunch, it worked only partially.

For ex, from the screen below, would like to access value of 'Status' from first row.

Expectation would be, Row0/1(based on indexing logic), column 'Status' and text/value "Arrived". However, it doesn't work so! Ranorex thinks, its something to discuss with Telerik. They asked to test it using 'inspect.exe' tool from win10 sdk. We tried and got same result. Below is the screenshot of result form inspect.exe

Row number is OK, but not column name is identified.. also, Value/Text is empty.

If inspect.exe cannot detect, heard no other automation tool in market can!

By the way, it works well with win.net grids.

Here is the sample of inspection on win.net grid... Column name and cell values are identified very well.

How can this be fixed for Telerik grid?!

Thanks in advance,

Vijay

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 27 May 2021, 09:40 AM

Hello,

First, I would like to point out that  Telerik UI for WinForms suite supports Microsoft Active Accessibility (MSAA) standard, not Microsoft UI Automation (UIA). We implement MSAA support in our controls in order to provide support for Visual Studio CodedUI tests and to provide support for Windows Narrators. 

I see in your attached screenshot that you have selected "UI Automation" option in the Inspect.exe tool instead of "MSAA". UI Automation providers offer some support for Microsoft Active Accessibility client applications. As a result, it is possible to spy some of UI elements.

However, because Microsoft Active Accessibility does not expose as much information as UI Automation, the two models are not fully compatible. More information about the difference between Microsoft Active Accessibility (MSAA) and Microsoft UI Automation (UIA) can be found in the following articles: 

Coded UI Test Extension for 3rd party Windows Forms controls–How to?
Microsoft Active Accessibility and UI Automation Compared
UI Automation Support for Standard Controls

I can suggest you 2 automation alternatives that will work well with the MSAA standard:

First, I can suggest you trying out TestComplete  tool for WinForms applications automation. We are internally using it and have automated all of the controls in our suite and it works great for all controls including RadGridView. In the attached screenshot you can see how will be able to access certain cell in the RadGridView via the TestComplete ObjectSpy (note that the screenshot is of an older TestComplete version). Feel free to also check out our TestComplete documentation articles

Another alternative that I can suggest for WinForms controls automation is Appium, which is an open source test automation framework. However, please note that automation with Appium can turn out to be far more complicated approach than using TestComplete, since you will have to write a large portion of the automation logic from scratch. You can learn more about it in the "WinForms UI Test Automation with Appium" blog.

I hope you find this information useful.

Regards,
Dimitar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Vijayanand
Top achievements
Rank 1
Iron
commented on 28 May 2021, 01:57 PM

Thank you very much for the answer, Dimitar! I tried to recognize objects using MSAA. Still the same problem. It works different on Telerik grid compared to winform grid. I would like to attach the screen shots, but looks like I cannot do so in comment section! Will write in detail in the Answer section.
0
Vijayanand
Top achievements
Rank 1
Iron
answered on 28 May 2021, 02:03 PM

Hi Dimitar,

Below are two screenshots from inspection using MSAA.

1. Telerik grid: Value/Text is empty. Instead the value is considered as name of the control!

 

2. winform grid: Text/Value is identified as expected, along with column header.

If MSAA is implemented, wondering why the difference?!

Support is very much appreciated!

Best Regards,

Vijay

 

 

0
Dimitar
Telerik team
answered on 31 May 2021, 09:43 AM

Hello Vijayanand,

Indeed when you spy a cell with the inspect.exe tool you will see that the Value property is empty. The reason is that accessibility tools such as Jaws and Narrator require only the Name property to be exposed in the MSAA implementation in order to read the cell content. 

However, I see that you might need the Cell Value property as well. That is why I have logged a feature request to expose the Cell Value property in the MSAA implementation. You can track its progress, subscribe for status changes and add your comments. I have also updated your Telerik Point.

You can expect the change to take effect in the upcoming Service Pack: R2 2021 SP1, scheduled for middle of June.

Regards,
Dimitar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Vijayanand
Top achievements
Rank 1
Iron
commented on 01 Jun 2021, 02:11 PM

Hello Dimitar, Thanks for considering it as feature request. It makes more sense to name the cell using using Row# and Column Name. Currently, name of cell is derived from cell value. That would be erroneous since same value can repeat in the same row, but on different column.
Dimitar
Telerik team
commented on 03 Jun 2021, 02:43 PM

Hello Vijayanand,

I understand that it would be more suitable for you if RadGridView cell's 'Name' property display 'Row#  Column Name' or 'Column Name Row#', as in the MS GridView.

However, according to our regression tests results, If we change the existing behavior for the 'Name' property, we will be make a major breaking change that will effect our clients and their existing CodedUI automation projects. 

That is why we are open to explore another alternative. Since we did not display anything in the 'Value' property, we can change it so that it displays 'Column Name Row#' as you asked.

If you are open to this suggestion, we will update the feature request for exposing the Cell 'Value' property.

Looking forward to your reply.

Regards,

Dimitar

Tags
GridView
Asked by
Vijayanand
Top achievements
Rank 1
Iron
Answers by
Dimitar
Telerik team
Vijayanand
Top achievements
Rank 1
Iron
Share this question
or