Jump to content
UBot Underground

rockydata

Members
  • Content Count

    3
  • Joined

  • Last visited

Posts posted by rockydata

  1. I'm trying to click a "Download CSV File" button, and then save the resulting file.

     

    comment("####### WHEN BUTTON APPEARS, CLICK IT & DOWNLOAD ###########")
         wait for browser event("Everything Loaded",#CB_MaxWait)

         if($exists(<name="ctl00$Content$ExportButton$imgExportCSV">)) {
                then {
                       comment("########## DOWNLOAD FILE #########################")
                       click(<name="ctl00$Content$ExportButton$imgExportCSV">,"Left Click","No")
                       comment("######### SAVE DOWNLOADED FILE ########################")
                       save downloaded file(#FilePathName)

                     }
               else {
                     }
        }

     

    Sometimes it works great.

    But often I still get the UBOT "Save As" screen, and it doesn't go away.

    (The wanted file still seems to get saved in background though).

     

    What am I doing wrong, or is there a better way?

    I'm not a html expert, but it appears that there isn't an url for the file to be downloaded, anywhere in the html code of the website.

    (Otherwise the "download file" command looks like something I could try out).

     

    It feels like a timing issue, where the "save download" internally gets executed either too early or too late after the click.

    Or should I live with it, and somehow close the unneeded "save as" windows when they appear?

     

    Any suggestions will be greatly appreciated!

     

     

     

×
×
  • Create New...