Forum Discussion

Tambo's avatar
Tambo
Occasional Contributor
8 years ago

Unable to obtain the popup menu for item during playback

Hey all, I'm currently migrating TestComplete scripts to a new environment and the .net applications are having difficulties with menu items. The log error messages are "Cannot obtain the popup menu for item 'File'" and  the code is simply checking different menu items.

 

UserProperties = Aliases.UserProperties
mainForm = UserProperties.MainForm
mainForm.StripMainMenu.Click("File|Import")

The old environment where things were working was a Windows 7 virtual machine running TestComplete 11, and the new one is Windows 10 running TestComplete 12. I've tried remapping and recording new tests but nothing seems to be working. Other parts of the application are still working fine. Any ideas on what I can try?

14 Replies

  • Marsha_R's avatar
    Marsha_R
    Icon for Champion Level 3 rankChampion Level 3

    Show us the Object Spy advanced details for that menu please?

    • Tambo's avatar
      Tambo
      Occasional Contributor

      Not sure if there's a better way to do it, but here's some quick screen shots:

       

      • Marsha_R's avatar
        Marsha_R
        Icon for Champion Level 3 rankChampion Level 3

        I don't see StripMainMenu (like you have in your code) in the ObjectSpy.  I do see StripPopupMenu.  Can you try that in your code and see what happens?

  • Tambo's avatar
    Tambo
    Occasional Contributor

    The real issue was windows scaling. I was able to get the tests to work again on the 4k monitor by changing the application compatibility properties for Override high DPI scaling behavior.

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor
      That's interesting... do you, perchance, in your "Click" actions, have any values in the parameters of Click other than -1?
      • Tambo's avatar
        Tambo
        Occasional Contributor

        Click actions are as follows:

        def Click(ClientX = -1, ClientY = -1, Shift = 0)