title: Using Selenium with Python and PhantomJS to download file to filesystem
body: <p>I've been grappling with using PhantomJS/Selenium/python-selenium to download a file to the filesystem.
  I'm able to easily navigate through the DOM and click, hover etc. Downloading a file is, however, proving to be quite troublesome. I've tried a headless approach with Firefox and pyvirtualdisplay but that wasn't working well either and was unbelievably slow. I know That CasperJS allows for file downloads. Does anyone know how to integrate CasperJS with Python or how to utilize PhantomJS to download files. Much appreciated.</p>