Forum Discussion
I'm able to access the following menu New Items -> More Items -> Task Request using the following key word actions, against the ribbon bar in Outlook 365
TestComplete might be recording the actions incorrectly for you - I suggest you remove PopupMenu and replace it with something similar to what is shown in the above image. Just to see if it works for you.
- ErikLarson8 days agoOccasional Contributor
I think if it recorded the windows correctly I might be able to do something like that. It shows the popup menu button as:
Aliases.<Program>.<main window>.RibbonBar.<client window area of ribbon>.toolbarX.toolbarY.DropDownButton
And the popup menus (no matter which button popped them up) themselves are shown as:
Aliases.<Program>.wndAfx.Item
If I do record and then click on the help popup menu, then go click on another popup menu button, the system recognizes BOTH popup menus as Aliases.<Program>.wndAfx.ItemSo it is like it cannot differentiate between them. I can automate buttons on the ribbons with no problems, but once one of these menus opens, I cannot do anything.
I have been banging my head against the wall trying to find a solution for this for the past month, and so far I cannot find any way to get it to recognize the menus correctly. I cannot test on office products, I don't have office installed on the testing environment computer.
- rraghvani7 days ago
Champion Level 3
If your application is well developed for automation, where each UI controls has unique ID’s, then TestComplete will correctly identify and create suitable mapped objects. However in certain instance, like you have just experienced, where TestComplete can not differentiate between UI controls. You will have to manually create the mapped object, and include suitable unique properties.
If you haven’t done so already, read through https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/index.html and then refer to Adding objects to the Name Mapping repository -> Manually.
Let me know how you get on.
- ErikLarson6 days agoOccasional Contributor
I'm still having difficulty. I cannot map these objects (or haven't figured out how) because they disappear from the screen when I click on the TestComplete window. The only way I can get them mapped is to have the record function do it, and then they all have the same reference in the software. It is as if MFC is re-using the ID for each of these popups it makes, which is very frustrating. It is out of my control, as they are made from within the button in the MFC ribbon control.
Here is a screenshot showing my MSAA being turned on. I have tried adding the separate pieces (Afx:RibbonBar:400000, Afx:DockPane:400000, etc..), and that hasn't made much difference.
I do notice that when I am recording a test and click on the drop down button an then on the menu I get a message about "Missing Debug Info" - The screenshot drew the red line over it, but it says "The control cannot be recorded properly, because no debug symbols were found for it." I again get that message as a popup message when I click stop on the record action. I'm thinking that id I could solve that one it might also help. I do have the .pdb file created by the compiler when our program is made in the directory with the tested application, as well as the MFC140u.pdb and MFC140ud.pdb files. I don't know what more to do to help it recognize things.
This is what it puts in my test script:
And it fails on the click action for "Item" with a message saying "Unable to find the object "Item" See details for additional information"
The object with the specified attributes does not exist.
Tested Object:
Aliased.Program.ProgramOptionsMenu
(Sys.Process("<Process Name>").Window("Afx:00400000:800:00010003:00000010:00000000","",4))It clicks on the menu dropdown button, but then fails to open the sub-menu to click on the item in the sub-menu. Which is why it is saying the object doesn't exist, it doesn't because the tester did not open the sub-menu before trying to select an item in it.
I am going to attach a sample program that has similar menus - look at the test menus button on the ribbon. These wind up behaving the same in TestComplete as the ones in our real program, and I cannot select them.