I have a Winform application which has a Telerik ListControl containing 100 elements.
The list adaptor for this object executes the following calls to the adaptor interface:
// finds the control by Rx object path
controlFound = Host.Local.FindSingle<Ranorex.List>(path, ranorexTimeout);
// walks the list of items for the item name sought with:
if (currListItem.Text.Equals(name))
// with the index found with the walk over the names the adaptor fails on
controlFound.SelectedItemIndex = index;
With the exception:
Ranorex.SetAttributeFailedException: Setting attribute 'selecteditemindex' failed on element '{List:radListControl1}'. ---> System.NotSupportedException: The operation is not supported.
at Ranorex.Plugin.MsaaFlavorElement.SetAttributeValue(Element element, String name, Object value)
at Ranorex.Core.Element.SetAttributeValue(String name, Object value)
--- End of inner exception stack trace ---
at Ranorex.Core.Element.SetAttributeValue(String name, Object value)
at Ranorex.List.set_SelectedItemIndex(Int32 value)
at Cognex.TA.Action.Winform.ListActions.SelectItem(Dictionary`2 properties, Dictionary`2 state, StringBuilder resultsString)
How is setting the currently selected item of a ListControl not a supported operation of the list adaptor?
What exactly is the code:
controlFound.SelectedItemIndex = index;
doing that the List Adaptor thinks the Telerik ListControl does not support selecting an item from the list?
List Adaptor throws exception for Telerik ListControl
-
- Posts: 54
- Joined: Wed Jan 09, 2013 7:02 pm
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: List Adaptor throws exception for Telerik ListControl
Hello,
Unfortunately it's not possible to invoke the .Select methods of MSAA elements, because it is simply not supported by MSAA.
Please take a look at the post "Using "Select" method in a text box".
A similar issue was discussed there.
Regards,
Bernhard
Unfortunately it's not possible to invoke the .Select methods of MSAA elements, because it is simply not supported by MSAA.
Please take a look at the post "Using "Select" method in a text box".
A similar issue was discussed there.
Regards,
Bernhard
-
- Posts: 54
- Joined: Wed Jan 09, 2013 7:02 pm
Re: List Adaptor throws exception for Telerik ListControl
And support of the the UI Automation elements of a Winform application will begin when?
-
- Posts: 54
- Joined: Wed Jan 09, 2013 7:02 pm
Re: List Adaptor throws exception for Telerik ListControl
I can set the text for Telerik controls via the Text Adapter. Is this because the Text Adapter is "flowing" around the MSAA accessibility interface to the underlying text control?
Let me do some more research on which setters for which controls work and which do not.
Let me do some more research on which setters for which controls work and which do not.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: List Adaptor throws exception for Telerik ListControl
As I just explained in this posting, the better alternative is using the Control element for that WinForms control instead of the corresponding MSAA element. The Control element in Ranorex supports much more functionality than MSAA and even UIA.JohnWashburn wrote:And support of the the UI Automation elements of a Winform application will begin when?
Just change your RanoreXPath and delete the last step/level so the parent element of the MSAA element is used (should be a Control element).
Regards,
Alex
Ranorex Team
-
- Posts: 54
- Joined: Wed Jan 09, 2013 7:02 pm
Re: List Adaptor throws exception for Telerik ListControl
First, off our controls do not use MSAA. But the controls are derived from the Telerik library. There is no winform control exposed. Only the the UI Automation element managed by the Telerik library for this piece of screen real estate is exposed. the Telerik control libraries make heavy use of virtualization so there is no control there most of the time, just a virtualization of the control.
I understand the MSAA-UIA bridge poses problems. Is there a change we can make to our winform application in order to inform Ranorex that the application has native support for UIA and, thus, use that accessibility channel for communication?
I understand the MSAA-UIA bridge poses problems. Is there a change we can make to our winform application in order to inform Ranorex that the application has native support for UIA and, thus, use that accessibility channel for communication?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: List Adaptor throws exception for Telerik ListControl
UPDATE: Ranorex 4.1.0 will have a setting for the WPF plugin to turn on UIA element generation for windows/controls natively implementing UIA. For more information see following forum post:JohnWashburn wrote: Is there a change we can make to our winform application in order to inform Ranorex that the application has native support for UIA and, thus, use that accessibility channel for communication?
http://www.ranorex.com/forum/using-sele ... tml#p19504
I'm not sure that I completely understand that set-up. Could you post a Ranorex snapshot of the application (or send it to our support email address), so we could check for options? Thanks!JohnWashburn wrote:There is no winform control exposed. Only the the UI Automation element managed by the Telerik library for this piece of screen real estate is exposed
Regards,
Alex
Ranorex Team
Last edited by Support Team on Fri Apr 26, 2013 8:54 am, edited 1 time in total.
Reason: UPDATE
Reason: UPDATE
-
- Posts: 54
- Joined: Wed Jan 09, 2013 7:02 pm
Re: List Adaptor throws exception for Telerik ListControl
I have uploaded via FTP the snapshot requested.
I also included a copy an application under test (TelerikWhetstone) which uses Telerik list control
and
a Visual Studio 2010 solution for C# automation code that drives the automation of the TelerikWhetstone application via the Ranorex runtime.
Telerik is adamant that the problem is that Ranorex does not properly interacting with the accessibility object associated with the virtualized list object.
I also included a copy an application under test (TelerikWhetstone) which uses Telerik list control
and
a Visual Studio 2010 solution for C# automation code that drives the automation of the TelerikWhetstone application via the Ranorex runtime.
Telerik is adamant that the problem is that Ranorex does not properly interacting with the accessibility object associated with the virtualized list object.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: List Adaptor throws exception for Telerik ListControl
Hmm, my findings are different. All the controls in your sample app are WinForms controls, all implementing MSAA. So nothing special there, no need wait for Ranorex 4.1.0 (also see my post in the associated forum thread).JohnWashburn wrote:First, off our controls do not use MSAA. But the controls are derived from the Telerik library. There is no winform control exposed.
As explained in my original answer to the problem, you just have to use the correct element to set the "SelectedItemIndex" attribute on. That is the parent element of the MSAA element you are currently using (RanoreXPath ".//container[@controlname='radListControl1']").
Alternatively, you can also call the "Select" action on the individual list items in order to select them. Both ways worked out of the box with the sample app.
Regards,
Alex
Ranorex Team