byronc 0 Posted November 20, 2017 Report Share Posted November 20, 2017 Hi everyone! I need help with downloading a file. I set the bot to click the download button but nothing comes up. Also when I interact with the window, a new window comes up asking me where I want to save the file. Any help would be greatly appreciated thank you so much! Quote Link to post Share on other sites
pash 504 Posted November 21, 2017 Report Share Posted November 21, 2017 seehttp://wiki.ubotstudio.com/wiki/Click_Dialog_Buttonhttp://wiki.ubotstudio.com/wiki/Windows_Commandshttp://wiki.ubotstudio.com/wiki/Save_Downloaded_File Quote Link to post Share on other sites
byronc 0 Posted November 21, 2017 Author Report Share Posted November 21, 2017 seehttp://wiki.ubotstudio.com/wiki/Click_Dialog_Buttonhttp://wiki.ubotstudio.com/wiki/Windows_Commandshttp://wiki.ubotstudio.com/wiki/Save_Downloaded_Fileill try that Quote Link to post Share on other sites
byronc 0 Posted November 21, 2017 Author Report Share Posted November 21, 2017 seehttp://wiki.ubotstudio.com/wiki/Click_Dialog_Buttonhttp://wiki.ubotstudio.com/wiki/Windows_Commandshttp://wiki.ubotstudio.com/wiki/Save_Downloaded_FileOkay i just tried it and its still not working when I set the element to the download button, the bot doesnt open a "save" window Quote Link to post Share on other sites
Sanjeev 46 Posted November 21, 2017 Report Share Posted November 21, 2017 posting your code + website may help trouble shoot your problem better. I understand its not always possible to do that.. just saying... Quote Link to post Share on other sites
byronc 0 Posted November 21, 2017 Author Report Share Posted November 21, 2017 posting your code + website may help trouble shoot your problem better. I understand its not always possible to do that.. just saying...clear table(&links)create table from file("{$special folder("Application")}/YTID.csv",&links)set(#row,0,"Global")click(<id="save-dropdown">,"Left Click","No")loop($table total rows(&links)) { close page navigate("http://ytcomments.klostermann.ca/","Wait") wait for element(<url field>,"","Appear") type text(<url field>,"https://www.youtube.com/watch?v={$table cell(&links,#row,0)}","Standard") wait for element(<id="scrape-btn">,"","Appear") click(<id="scrape-btn">,"Left Click","No") wait for element($element offset(<class="iCheck-helper">,0),"","Appear") focus($element offset(<class="iCheck-helper">,0)) click($element offset(<class="iCheck-helper">,2),"Left Click","No") click($element offset(<class="iCheck-helper">,6),"Left Click","No") click($element offset(<class="iCheck-helper">,3),"Left Click","No") click(<id="save-dropdown">,"Left Click","No") wait for element(<id="save-dropdown-contents">,"","Appear") click(<id="save-csv">,"Left Click","No") click(<download="comments-{$table cell(&links,#row,0)}.csv">,"Left Click","No") wait(2) plugin command("WindowsCommands.dll", "set dialog text", "Save", "File name:", "comments-{$table cell(&links,#row,0)}.csv") wait(2) plugin command("WindowsCommands.dll", "click dialog button", "Save", "Save") increment(#row)} Quote Link to post Share on other sites
Sanjeev 46 Posted November 21, 2017 Report Share Posted November 21, 2017 I have simplified your code above to just focus on the problem..which is downloading the file to disk, take a look.. this worked on my side.. I was able to successfully download the file as csv to disk. navigate("http://ytcomments.klostermann.ca/","Wait") type text(<url field>,"https://www.youtube.com/watch?v=a2AGRYwyUqU","Standard") click(<id="scrape-btn">,"Left Click","No") loop(1) { click(<id="save-csv">,"Left Click","No") wait(1) plugin command("WindowsCommands.dll", "click dialog button", "Save As", "Save") } I set the bot to click the download button but nothing comes up. Also when I interact with the window, a new window comes up asking me where I want to save the file. I clicked on that 'red download button' manually - and it gave a small dropdown with 2 options -save as json or save as csvI chose csv - and then the web page popped up the windows dialog.. I think your click code -click(<id="save-csv">,"Left Click","No") directly brought up this dialog which is what is needed to save the file to disk. Next I followed up your click command with a windows automation command to save file to disk. I hope this helps. Quote Link to post Share on other sites
byronc 0 Posted November 21, 2017 Author Report Share Posted November 21, 2017 Its still not downloading for me Also is there anyway to avoid clicking the "red download button" manually 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.