When using pattern (WindowPattern)it works normally in windows 10 but failing in window 11
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 , 22H2 OS build 22621.2428
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 & Regards,
Chandan Kumar