Cannot find popup menu on playback
We are having a heck of a time trying to find and automate some of the controls within our application. It is a .NET app and it has several "popup" menus that users use for navigation. The problem is that we can find these menus with the object spy (point and fix), but on playback we cannot activate the menus, even though we are trying to simulate user actions. Below is some of the code we are trying:
Sub ClickProp
THIS NEXT LINE MOST CLOSELY IMITATES USER ACTION, HOWEVER THE POPUP CANNOT BE ACTIVATED
' Aliases.M3_AKShell.AKToolStripDDMenu.ucChangeLevel.tableLayoutPanel1.tvLevel.ClickItem("|Enterprise-Alpha-1|Company-Bravo-2|Property-Victor-3") Dim btn
THE FINDCHILD METHOD FINDS THE CONTROL CORRECTLY Set btn = Sys.Process("M3.AKShell").FindChild("WndClass", "WindowsForms10.SysTreeView32.app.0.21093c0_r39_ad1", 2000) If btn.Exists Then
BTN.CLICK DOES NOT WORK AS IT CANNOT ACTIVATE THE POPUP btn.click Log.Message "Success", "Item Found" Else Log.Error "The control was not found." End If End Sub
I hope this is clear enough. I really need to figure out how to get this working. Thanks for any and all help :)
So you need to hover the mouse over the parent control, and then click the popup menu?
If so then you'll need a low level procedure to move the mouse and "hover" over the parent control, wait a few seconds, and then click the menu.
[Edit] You can use .HoverMouse method on the parent control to hover and get the menu to pop up.