Hello,
I'm having trouble reading the UI Automation elements for ultraCombo that have collections in the DataSource.
As you can see from the first image in the attachment, the automation information retrieved is the entire table, rather than just the element hovered over. What's more, the dropdown of the ultraCombo does not have the ultraCombo as its parent.
This problem occurs when I set the UltraControlBase.UIAutomationForCodedUITestingEnabled to false. As you can see in the second image, when set to true, the automation elements function normally.
However, I'm obliged to set the UIAutomationForCodedUITestingEnabled to false for other reasons in the application. Hence my question: Is there a way to have normal operation of automation elements with the parameter UltraControlBase.UIAutomationForCodedUITestingEnabled = false ?
Thank you for your attention.
Hello Luc,
In order to use CodedUI / UI Automated testing with the Infragistics for Windows Forms toolset, you will need to have the UltraControlBase.UIAutomationForCodedUITestingEnabled set to true. If you set this to false, the UIAutomationProviders for the controls will be ignored and will not be created. This will prevent the automated testing recordings from working correctly.
What is the reason you are setting the UIAutomationForCodedUITestingEnabled property to false?
Please let me know if you have any other questions or concerns on this matter.
Hi Andrew,
When UltraControlBase.UIAutomationForCodedUITestingEnabled is set to True I'm having problems capturing the accessibility properties that are defined in my application.
With UIAutomationForCodedUITestingEnabled = false, the “LegacyIAccessible.Name” of Inspect.exe in UI Automation mode is correctly captured and set to the value specified in the “AccessibleName” property.
With UIAutomationForCodedUITestingEnabled = true, the “LegacyIAccessible.Name” of Inspect.exe in UI Automation mode is not captured, it remains empty.
When I talk about LegacyIAccessible.Name, I'm talking about the AutomationElement.AutomationElementInformation.Name property.
Yes, I think the accessibility information is overwritten when I set UIAutomationForCodedUITestingEnabled to true. That's why I prefer to leave this value at false for all controls except ultraCombo, as it causes me problems retrieving accessibility information for the items in its list.
Is it possible, for UltraCombo controls only, to call the overload for CreateUIAutomationProvider while leaving UIAutomationForCodedUITestingEnabled set to false?
Thank you for confirming about the LegacyIAccessible.Name.
I have asked our development teams for more information in this case, and they have confirmed that it is not possible to have UIAutomationForCodedUITestingEnabled true for some controls and false for others. It is all-or-none in this case. It also may be possible to call the overload for CreateUIAutomationProvider using reflection, but this will not really be sufficient because it will just be calling the root provider for the UltraCombo. UI Automation is a whole tree structure of parent/children providers in which most are generated based on the UI elements. You would still need to allow the UIAutomationForCodedUITestingEnabled for the elements in the drop-down and other pieces to create the automation providers.
With that said, I have pointed our development teams at this forum thread, and they are curious what the images were that you originally tried to put inline, which our forums are unfortunately having issues with currently. Can you please attach these images in a .zip file, as this might help to point to something that might be missing or unavailable on the MSAA framework side that should potentially be there in our implementation.
Hi Andrew, Thanks for the clarification on UIAutomationForCodedUITestingEnabled, so if I've understood correctly, as I need to provide accessibility information for my drop-down lists, I'm obliged to enable it. I've attached screenshots of the problem I encountered when I activated UIAutomationForCodedUITestingEnabled on this link: www.transfernow.net/.../202501069ExPhmI3 because the site returns an error when I try to attach the file.
The first image “1_property_false” is with UIAutomationForCodedUITestingEnabled = false, as you could see the accessible name is correctly provided, however the array items are not captured (also when properiété is disabled the drop-down is not the child of the combo).
The second image “2_property_true” is with UIAutomationForCodedUITestingEnabled = true, this time the accessible name is not provided but the array items are captured.
What I need is for the accessible name to be provided and for the items to be captured.
I have forwarded the images to our development teams, and they have instructed me to log this as a bug in our Windows Forms toolset, as it appears that the drop-down items are not accessible via UI Automation with UIAutomationForCodedUITestingEnabled set to false.
I have logged this behavior in our internal tracking systems with a development ID of 35658. I will be linking this to a private support case that I have created for you with an ID of C-00240699. You can access this case after signing into your account here: https://account.infragistics.com/support-cases. The next step will be for a developer to investigate further and offer a fix or other resolution, at which time I will notify you that this has happened. You can send updates to the case or this forum thread at any time.
Thanks for your help, I hope the development team will find a solution