Forum Discussion

Nimeshika's avatar
Nimeshika
Contributor
11 years ago

Unable to right click and select sub item from pop up menu

Hello,
I need to right click on a label which gives me a pop-up of address "Sys.Process("SCHEDULING").Window("#32768", "", 1).WndClass" and of wndClass "#32768 ". When I click on one of the option I get another pop-up list of same wndClass.
I was able to click itenm in first pop up but could not click on sub item as it shows error as "The window was destroyed during method execution.".
It does not has clickItem property.
.Nor I could use Click("abc|def").
I also tried using Keys("[Down]"+"[Right]")
Is there any other way where the sub pop up menu will not vanish before clicking an item in it?
The following attachments include the snapshot of methods supported y that pop-up menu.
Since I cant share the screen shot of my application I have attached a snapshot of similar situation on my desktop(address and properties may vary).
Example:I want to right click on desktop, select SORT BY and then select NAME

 

 

Methods.PNGpop-upMenu.png

4 Replies

    • mugheessiddiqui's avatar
      mugheessiddiqui
      Contributor

      Add a delay statement between these two lines

       

      folderView.ClickR(411, 272);
      
      Delay (1000); // add delay like this.
      folderView.PopupMenu.Click("Sort by|Name");

       

      • Nimeshika's avatar
        Nimeshika
        Contributor

        Thanks HKosova and Mugheessiddiqui.

        It worked :smileyhappy:

  • Hi Nimeshika,

    If you record menu selection, what script do you get? Does it play back corrrectly?

    The desktop example should be like this:

    // JScript
    function Test()
    {
      var folderView = Sys.Process("explorer").Window("Progman", "Program Manager").Window("SHELLDLL_DefView").Window("SysListView32", "FolderView");
    folderView.ClickR(411, 272); folderView.PopupMenu.Click("Sort by|Name"); }