I have a combo box in a third-party application that when selected via the inspect.exe shows true for the IsValuePatternAvailable. Inspect.exe also shows that the value is "5".
However, running the following UIAutomation code on that combo box produces an error:
ValuePattern valuePattern = control.GetCurrentPattern(ValuePattern.Pattern) as ValuePattern;
The error details:
System.InvalidOperationException occurred HResult=0x80131509 Message=Unsupported Pattern. Source=UIAutomationClient
Debugging shows the class name to be "WindowsForms10.COMBOBOX.app.0.13965fa_r9_ad1". I simply need to get the current value of the said combo box. Any ideas?
User contributions licensed under CC BY-SA 3.0