Save Downloaded File
(→Example) |
(→Important Tips) |
||
Line 31: | Line 31: | ||
save downloaded file("{$special folder("Desktop")}/writing.zip") | save downloaded file("{$special folder("Desktop")}/writing.zip") | ||
wait(3) | wait(3) | ||
− | <pre> | + | </pre> |
Line 44: | Line 44: | ||
wait(3) | wait(3) | ||
navigate("https://code.google.com/p/epub-samples/downloads/detail?name=kusamakura-japanese-vertical-writing-20121124.epub&can=2&q=", "Wait") | navigate("https://code.google.com/p/epub-samples/downloads/detail?name=kusamakura-japanese-vertical-writing-20121124.epub&can=2&q=", "Wait") | ||
− | <pre> | + | </pre> |
Revision as of 21:34, 12 June 2015
This command is part of the Browser Command. Save Downloaded File downloads files that have been downloaded to the browser. The command allows you to designate where you would like to save the file to what you would like to call the file.
File To Save To: The file path where the downloaded file will be save to. The file path must include a file name and extension (such as C:\Users\Desktop\Miscellaneous\myfile.wav)
Example
navigate("https://code.google.com/p/epub-samples/downloads/detail?name=kusamakura-japanese-vertical-writing-20121124.epub&can=2&q=", "Wait") wait(3) click(<alt="Download">, "Left Click", "No") save downloaded file("{$special folder("Desktop")}/writing.zip")
Running the script will click the download button, which downloads the file to the browser. The save downloaded file command then saves the file to the chosen location.
Important Tips
If you encounter a dialog box after you click the download button, simply add a wait command after the Save Downloaded File command
navigate("https://code.google.com/p/epub-samples/downloads/detail?name=kusamakura-japanese-vertical-writing-20121124.epub&can=2&q=", "Wait") wait(3) click(<alt="Download">, "Left Click", "No") save downloaded file("{$special folder("Desktop")}/writing.zip") wait(3)
Also add a navigate command after the wait command that goes to the same url to refresh the browser:
navigate("https://code.google.com/p/epub-samples/downloads/detail?name=kusamakura-japanese-vertical-writing-20121124.epub&can=2&q=", "Wait") wait(3) click(<alt="Download">, "Left Click", "No") save downloaded file("{$special folder("Desktop")}/writing.zip") wait(3) navigate("https://code.google.com/p/epub-samples/downloads/detail?name=kusamakura-japanese-vertical-writing-20121124.epub&can=2&q=", "Wait")