-
Notifications
You must be signed in to change notification settings - Fork 486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Selected Item of combobox enable = "false" #190
Comments
This is a limitation of the underlying UIA framework white uses. You should use IsReadOnly=”True” rather than IsEnabled=”False” From: superbigsoft [mailto:[email protected]] Hi White team, I have a small problem with controls have enable = "False" For example, I have a wpf combo box define as: And I use white to get the selected value of this combobox public ComboBox CbxGemeinde {
protected ComboBox GetCombobox(string controlId) {
But the value get from combobox are: Could you please help me check what wrong in getting selected value of combo box? Thanks, — |
Thanks for your fast answer! Is there any work-around for this? We need this feature to validate the SelectedItem in the Combobox. Thanks, |
Unfortunately not. The only workaround is to make the combobox readonly instead of disabled. |
Closing issue, this is not possible from UIA. @superbigsoft maybe try the COMUIA Branch, you can get the NuGet packages from my build server. It uses the newer COM libraries and MAY support it. But no guarantees. Try using inspect.exe and see if it can see the information you need, if it can, then the Com UIA branch may work for you |
Hi Team, Thanks |
I have used another technique to get the selected item from the disabled dropdownlist. |
Would you be able to post your findings to help others? |
For My scenario, I have to take a selected item text from the disabled combobox. So I have just assigned the combobox automation element into textbox and take a value from the textbox like below. var groupChild = _contentOwnerGroupElement.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Group)); |
Hi White team,
I have a small problem with controls have enable = "False"
For example, I have a wpf combo box define as:
And I use white to get the selected value of this combobox
But the value get from combobox are:
combobox.SelectedItem is null,
combobox.Items is empty,
combobox.SelectedItemText = ""
Could you please help me check what wrong in getting selected value of combo box?
Thanks,
Nam
The text was updated successfully, but these errors were encountered: