PhantomJS and specifying download directory

Asked by pratik shah

Hello everyone --

I'm attempting to download a file using PhantomJS but I need to pass in the directory where I want to store the asset. Similar to profile.set_preference('browser.download.dir', download_path) for FIrefox, is there a way to do this in Phantom?

Its probably not designed (or doesn't natively support) file downloads?

Question information

Language:
English Edit question
Status:
Solved
For:
selenium-simple-test Edit question
Assignee:
No assignee Edit question
Solved by:
Corey Goldberg
Solved:
Last query:
Last reply:
Revision history for this message
Best Corey Goldberg (coreygoldberg) said :
#1

I don't believe file download is currently supported in PhantomJS.

see: https://github.com/ariya/phantomjs/issues/10052

Revision history for this message
pratik shah (pratik-shah) said :
#2

As always, Thanks Corey, I suspected this was the case found the github issue perusing articles last night.

Revision history for this message
pratik shah (pratik-shah) said :
#3

Thanks Corey Goldberg, that solved my question.