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

When using pattern it works normally in windows 10 but failing in window 11. #101

Open
chandanKumar872 opened this issue Oct 18, 2023 · 1 comment

Comments

@chandanKumar872
Copy link

chandanKumar872 commented Oct 18, 2023

Hi,

Related to Desktop UI Automation, I am facing issue when trying to find control using pattern it work normally in Windows 10 but failing in Window 11.

An exception occurred in the Test Case Execution.
- Exception message: 'Element not available'
- Exception callstack: ' at System.Windows.Automation.AutomationElement.GetCurrentPropertyValue(AutomationProperty property, Boolean ignoreDefaultValue)
at System.Windows.Automation.AutomationElement.GetCurrentPropertyValue(AutomationProperty property)
at System.Windows.Automation.AutomationElement.GetPropertyValue(AutomationProperty property, Boolean cached)
at System.Windows.Automation.AutomationElement.AutomationElementInformation.get_IsOffscreen()
at Rexroth.TestAutomation.TestFramework.UIAutomationX.Controls.Control.get_Visible() in

Notes: Some APIs of AutomationElement like GetCurrentPropertyValue,... has the same issue and all of them throws same exception Element not available'

OS Information:
Name: Microsoft Windows 11

Version 22H2

Could any one please let me know that AutomationClient library officially support in Windows 11 yet ?
Please help me and let me know how to resolve this exception.

Thanks,
Chandan Kumar

@shkurski
Copy link

shkurski commented Dec 7, 2023

@chandanKumar872 If I may ask, how did you get it working on Windows 10? An attempt to instantiate winrt::Windows::UI::UIAutomation::Core::CoreAutomationRemoteOperation fails with REGDB_E_CLASSNOTREG even though MSDN says:

Device family
Windows 10, version 2104 (introduced in 10.0.20348.0)
API contract
Windows.UI.UIAutomation.UIAutomationContract (introduced in v1.0)

and these version requirements seem to be satisfied.

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