Skip to content

System.Windows.Automation.InvokePattern.Invoke blocks on a menu item. #10244

@lovettchris

Description

@lovettchris

.NET version

7.0.403

Did it work in .NET Framework?

Yes

Did it work in any of the earlier releases of .NET Core or .NET 5+?

Don't know, it works in .NET Framework 4.6.2, but not in latest version of .NET Framework 4.8

Issue description

Run the unit test in the following solution. Notice that the unit test hangs on line 80 of UnitTest1.cs which is the InvokePattern.Invoke call on the FIle/Open... menu item. This makes it impossible to test any menu item using System.Automation?

Steps to reproduce

  1. on Windows 11 22H2 build 22621.2361
  2. Load this solution into VS 2022
  3. Run Test/Debug all tests
  4. wait for windows open file dialog to appear
  5. Notice it never disappears
  6. hit break in the debugger and you will see it is blocked on line 80 of UnitTest1.cs.

WinFormsApp1.zip

Metadata

Metadata

Assignees

Labels

💥 regression-releaseRegression from a public release🚧 work in progressWork that is current in progressinvestigateItems we want to investigate before making a decision on an issuetenet-accessibilityMAS violation, UIA issue; problems with accessibility standardswaiting-on-teamThis work item needs to be discussed with team or is waiting on team action in order to proceed

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions