When using pattern (WindowPattern)it works normally in windows 10 but failing in window 11

Chandan Kumar (SX/EDC2) 0 Reputation points
2023-10-19T09:59:22.93+00:00

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

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
11,417 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.