Inspect.exe shows true for IsValuePatternAvailable but UIAutomation says it's unsported for combo box

0

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?

c#
combobox
ui-automation
asked on Stack Overflow Aug 27, 2017 by pilipinoy

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0