Download and save file

Hello,
the question resp. answer may be to obvious, but I really tried to find a solution here.

I simply want to download a file and save it to disk. The files are transaction statements from my bank’s web site. Log in works fine and also the download dialog opens, using the open command.

How do I continue from there? Is using XType to control the download window and then the file selection window really the only possibility to save the file a specific location?

Or am I using the wrong tool for the job?

Thanks a lot!

Can you post a screenshot of where you get stuck? Normally browsers download bank statements automatically, or? I mean, just a click on the link will do, no file dialog shows up.

For example, I have recorded this script:

{
  "Name": "test",
  "CreationDate": "2020-9-7",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://www.stats.govt.nz/large-datasets/csv-files-for-download/",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "linkText=Annual enterprise survey: 2019 financial year (provisional) – CSV",
      "Value": "",
      "Targets": [
        "linkText=Annual enterprise survey: 2019 financial year (provisional) – CSV",
        "xpath=//*[@id=\"main\"]/section/div/div/div/article/div/div[2]/article/ul/li/div/div/h3/a",
        "xpath=//h3/a",
        "css=#main > section > div > div > div > article > div > div:nth-child(2) > article > ul > li:nth-child(1) > div > div > h3 > a"
      ]
    }
  ]
}

by opening the file, clicking the link, clicking Ok and clicking Save As. Only the first two actions are actually recorded. It may be related to the setting of my Firefox to not automatically download and save files but asking what to do. But I would rather not change this setting globally.

Screenshot is in German, but I think you get the idea.

Screenshot_20200907_124223

Best Thanks!