Skip to content
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

Getting property accValue of IAccessible throws an error. #14

Open
wawer1 opened this issue Apr 13, 2017 · 1 comment
Open

Getting property accValue of IAccessible throws an error. #14

wawer1 opened this issue Apr 13, 2017 · 1 comment

Comments

@wawer1
Copy link

wawer1 commented Apr 13, 2017

Getting property accValue of IAccessible throws an error:
Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))

using System.Windows.Automation;

public object GetValue(AutomationElement element){
            object patternObj;
            if (element.TryGetCurrentPattern(LegacyIAccessiblePattern.Pattern, out patternObj))
            {
                var legacyIAccessiblePattern = (LegacyIAccessiblePattern)patternObj;
                var iAccessible = legacyIAccessiblePattern.GetIAccessible();

                if (iAccessible != null)
                {
                    result = iAccessible.accValue; // ERROR HERE
                }
            }
            return Accessible.accValue;
}
@AgustinReyes
Copy link

Hello sir, did you find a fix for this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants