Skip to content

Commit

Permalink
Update Window.cs
Browse files Browse the repository at this point in the history
Added another option for identifying a context menu for Win32 framwork:
Classname==>#32768
  • Loading branch information
tomersalem authored and Roemer committed Oct 24, 2023
1 parent 9f3e781 commit 9e58990
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FlaUI.Core/AutomationElements/Window.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public Menu GetContextMenuByFrameworkType(FrameworkType frameworkType)
{
// The main menu is directly under the desktop with the name "Context" or in a few cases "System"
var desktop = FrameworkAutomationElement.Automation.GetDesktop();
var nameCondition = ConditionFactory.ByName("Context").Or(ConditionFactory.ByName("System"));
var nameCondition = ConditionFactory.ByName("Context").Or(ConditionFactory.ByName("System")).Or(ConditionFactory.ByClassName("#32768"));
var ctxMenu = desktop.FindFirstChild(cf => cf.ByControlType(ControlType.Menu).And(nameCondition)).AsMenu();
if (ctxMenu != null)
{
Expand Down

0 comments on commit 9e58990

Please sign in to comment.