PhantomJS and specifying download directory

Asked by pratik shah on 2013-06-17

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:
2013-06-18
Last query:
2013-06-18
Last reply:
2013-06-18
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

pratik shah (pratik-shah) said : #2

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

pratik shah (pratik-shah) said : #3

Thanks Corey Goldberg, that solved my question.