pokerdawg 2 Posted October 24, 2016 Report Share Posted October 24, 2016 Hello all - I'm doing a simple bot to go into a site, do a search, click a link to generate a CSV and save the CSV. Once that is working, I want to loop. I did find another post discussing saving the file (I forget whose topic, sorry) saying to use "save downloaded file" - which is working. But not as expected. I click the hyperlink to download the CSV and then have the "Save Downloaded File" tag The file quietly saves into the folder I specify, with the file name I specify (I know when I loop I have to change that file name to a variable) However, the O/S or Browser generated "Save As" dialog window is still on screen. Even if UBot ignores it and continues, it will loop and loop continuing additional dialogue boxes - and that is assuming that the underlying browser doesn't wait for me to manually close it. Is there a command to close open dialogs? How would you handle this? Thanks Chris Quote Link to post Share on other sites
pokerdawg 2 Posted October 24, 2016 Author Report Share Posted October 24, 2016 (edited) I actually got it to work like this: click(<class="all">,"Left Click","No") // This is the link to start the download save downloaded file("D:\\Downloads\\my-save-folder\\my-file-name.csv") wait(1.5) plugin command("WindowsCommands.dll", "click dialog button", "Save As", "Cancel") Is this the "right" way? Is there a better / more stable way? Thanks Edited October 24, 2016 by pokerdawg Quote Link to post Share on other sites
HelloInsomnia 1103 Posted October 24, 2016 Report Share Posted October 24, 2016 Can you scrape the direct link to the file? Quote Link to post Share on other sites
pokerdawg 2 Posted October 24, 2016 Author Report Share Posted October 24, 2016 I "clicked" on the link which triggers a browser / OS "save as" dialogue box. The save download file is downloading the file properly, and I'm opening the CSV, with the CSV results I expect The last statement instantly closes the pop up so I don't see it. When I'm saying "pop up" it isn't a CSS / Ajax / JS pop up. It's what you would get if you right-click on a CSV/PDF link on a page, and it gives you a "save as" option. Quote Link to post Share on other sites
HelloInsomnia 1103 Posted October 24, 2016 Report Share Posted October 24, 2016 Can you share the site either here or via PM, there could be another way to download the file without clicking the button. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.