Kantu IDE: Unable to automate right-click on website menu and textbox does not take input

Hi,

I have been unable to automate the JSON script that I have pasted below. It fails at 2 places. I have put comments those places so that these are easy to find.
A menu opens up where 3 parameters have to be given as input.

  1. For the “Indicator” parameter: There is a step where all the options that are displayed have to be selected. CTRL-A is not possible so we need to right-click and “Select All” in the webpage specific context menu. Please note that this not the browser menu.
  2. For the “Time” menu, the input box accepts the “-24” value (this shows that the xpath is correct), but the Range should change to since “1 January 1994”. This does not happen. It is as if the negative number in the input box does not take effect.

I am hoping that even if the above is not possible by conventional means that at least I be provided with a hack so as to accomplish the above by passing javascript in storeEval.

Thank you.

Here is the JSON.

{
  "CreationDate": "2018-10-18",
  "Commands": [
    {
      "Command": "store",
      "Target": "slow",
      "Value": "!replayspeed"
    },
    {
      "Command": "store",
      "Target": "120",
      "Value": "!TIMEOUT_WAIT"
    },
    {
      "Command": "open",
      "Target": "https://www.imf.org/external/index.htm",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "link=International Financial Statistics",
      "Value": ""
    },
    {
      "Command": "selectWindow",
      "Target": "tab=1",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "link=Query",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "xpath=(.//*[normalize-space(text()) and normalize-space(.)='Indicator'])[1]/following::img[1]",
      "Value": ""
    },
    {
      "Command": "comment",
      "Target": "This should have been a mouse \"right-click\". It would open up a programmed context menu from which we select \"Select All\" optin",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "xpath=(.//*[normalize-space(text()) and normalize-space(.)='Reset'])[1]/following::div[2]",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "xpath=(.//*[normalize-space(text()) and normalize-space(.)='Balance of Payments, Exceptional financing, US Dollars'])[1]/following::div[80]",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "xpath=(.//*[normalize-space(text()) and normalize-space(.)='Time'])[1]/following::img[1]",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "xpath=(.//*[normalize-space(text()) and normalize-space(.)='List'])[1]/following::div[2]",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "xpath=(.//*[normalize-space(text()) and normalize-space(.)='Half-years'])[1]/following::div[1]",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "xpath=(.//*[normalize-space(text()) and normalize-space(.)='Quarters'])[1]/following::div[1]",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "xpath=(.//*[normalize-space(text()) and normalize-space(.)='Today'])[2]/following::input[1]",
      "Value": ""
    },
    {
      "Command": "type",
      "Target": "xpath=(.//*[normalize-space(text()) and normalize-space(.)='Today'])[2]/following::input[1]",
      "Value": "-24"
    },
    {
      "Command": "comment",
      "Target": "Please note that the -24 does not reflect though it gets typed into the textbox. The From Date should have become i Jan, 1994. You can verify this when \"-24\" is manually entered",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "xpath=(.//*[normalize-space(text()) and normalize-space(.)='Reset'])[1]/following::div[2]",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "xpath=(.//*[normalize-space(text()) and normalize-space(.)='Range:'])[1]/following::div[3]",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "xpath=(.//*[normalize-space(text()) and normalize-space(.)='Country'])[1]/following::img[1]",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "xpath=(.//*[normalize-space(text()) and normalize-space(.)='Filter - Country'])[1]/following::input[1]",
      "Value": ""
    },
    {
      "Command": "sendKeys",
      "Target": "xpath=(.//*[normalize-space(text()) and normalize-space(.)='Filter - Country'])[1]/following::input[1]",
      "Value": "vietnam"
    },
    {
      "Command": "click",
      "Target": "xpath=(.//*[normalize-space(text()) and normalize-space(.)='Filter - Country'])[1]/following::div[9]",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "xpath=(.//*[normalize-space(text()) and normalize-space(.)='Filter - Country'])[1]/following::span[2]",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "xpath=(.//*[normalize-space(text()) and normalize-space(.)='Reset'])[1]/following::div[2]",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "//*[@class='PPContent' and text()='OK']",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "xpath=(.//*[normalize-space(text()) and normalize-space(.)='Export'])[1]/following::div[1]",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "//*[@class=\"PPMenuItemContentPart\" and text()=\".xlsx\"]",
      "Value": ""
    }
  ]
}

Have you tried “Command”: “executeScript_Sandbox”?