Automate downloading of a spreadsheet

From a user: “Hi I’m trying to automate the downloading of a spreadsheet from this website: FedWatch - CME Group

The procedure is: (a) Open the page, (b) click on “Downloads” on the left side bar, (c) click on “All upcoming meetings.”

I cannot make any progress on step ‘b’ - I have tried both click and xclick methods without success. Any pointers would be much appreciated”

Hello, we looked into this. XClick works fine, but the challenge is that the download button is not visible in the browser view by default. It is further down the page. Unlike the regular CLICK command, the visual XCLICK command needs to see the button.

→ To find and click on the button, here is the solution:

  • first click anywhere on the page (here the “FOMC” word) to set the focus on the page
  • then use XTYPE | ${KEY_PAGE_DOWN} to scroll down the page

This video shows the macro:

I think there is no need to scroll down using Xclick. Just use the “click” command with an xpath that targets the following element:

<a id=“ctl00_MainContent_ucViewControl_IntegratedFedWatchTool_lbDownloads” href=“javascript:__doPostBack(‘ctl00$MainContent$ucViewControl_IntegratedFedWatchTool$lbDownloads’,‘’)”>Downloads</a>

    {
      "Command": "open",
      "Target": "https://www.cmegroup.com/markets/interest-rates/cme-fedwatch-tool.html",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "pause",
      "Target": "3000",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "selectFrame",
      "Target": "index=1",
      "Value": "",
      "Description": "index=0"
    },
    {
      "Command": "XClick",
      "Target": "linkText=Downloads",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "pause",
      "Target": "3000",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=",
      "Value": "",
      "Description": ""
    }

worked on linux but download xclick not working on windows

index can be 0/1

Just looked into this a little bit more and I can confirm, that this is a javascript link within an iframe. Makes it a little bit more complicated… do not have a solution yet… still working on it…

OK I got somethings that works and might be some more tweaks.
You basically do a javascript click on that button with the kantu “execute” command.
I tried it few times and it worked. I had a couple of times id did not. There is also a way to code the “selectFrame” command into your java script. So you can remove the first kantu command. Let me know if you need more help.

{
“Command”: “selectFrame”,
“Target”: “index=0”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “executeScript”,
“Target”: “document.getElementById(‘ctl00_MainContent_ucViewControl_IntegratedFedWatchTool_lbDownloads’).click();”,
“Value”: “”,
“Description”: “”
}

OK this should work:
Same concept to use a javascript click on the page element but after targeting the iFrame with its ID to make sure it’s the right one. Tried it few times and looks good.

{
“Command”: “open”,
“Target”: “https://www.cmegroup.com/markets/interest-rates/cme-fedwatch-tool.html”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “selectFrame”,
“Target”: “id=cmeIframe-jtxelq2f”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “executeScript”,
“Target”: “document.getElementById(‘ctl00_MainContent_ucViewControl_IntegratedFedWatchTool_lbDownloads’).click();”,
“Value”: “”,
“Description”: “”
}