Forum Discussion
Well , I tried but it doesnt work , giving Error : PopupMenu is null or not an object
Development Hierarchy shown as below :
The code of the AUT doesn't help. Please provide the code you are actually executing in TestComplete. We'll need that to determine what's going wrong.
- deshmukh4 years agoNew Contributor
Provided code in Private Message , Plz have a look
Thanks 🙂
- tristaanogre4 years agoEsteemed Contributor
I'm coping the code that I received via PM here so that the whole community can contribute to solution.
function commit() { var umprocess =Sys.Process("Simplivity.UpgradeManager.View"); var tButton = umprocess.WPFObject("HwndSource: Shell", "HPE SimpliVity Upgrade Manager").WPFObject("Shell", "HPE SimpliVity Upgrade Manager", 1).WPFObject("RootGrid").WPFObject("ContainerView", "", 1).WPFObject("Grid", "", 1).WPFObject("ContentPresenter", "", 1).WPFObject("FederationView", "", 1).WPFObject("Grid", "", 1).WPFObject("radTreeListView").WPFObject("TreeListViewRow", "", 4).WPFObject("GridViewCell", "", 3).WPFObject("Grid", "", 1).WPFObject("Border", "", 1).WPFObject("Grid", "", 1).WPFObject("Tbutton") tButton.Click(); aqUtils.Delay(200000); var CommitMenu = tButton.PopupMenu if(CommitMenu != null) { CommitMenu.Click(); } }
Now that we have that code... where exactly does the error occcur? On which line of the code?
Also, note that clicking on a popup menu, as per the documentation that I provided earlier, requires you to indicate WHAT item on that menu you're clicking.
Another suggestion.... have you tried recording the steps? It might be that what we think is the proper popup menu isn't the right one. If you record a simple script with interaction with the components you want, that should show better what's going on.
- AlexKaras4 years agoChampion Level 3
deshmukh :
tButton.Click(); aqUtils.Delay(200000); var CommitMenu = tButton.PopupMenu
PopupMenu well may be not a child of the tButton object, but a child of some other window. Try to highlight it using Object Spy in the Point-And-Fix mode and check the hierarchy for the given popup menu object.
Related Content
- 8 years agomfoster711
- 12 years agoASV
- 3 years agoaaronpliu
Recent Discussions
- 3 days agovladd1