I cannot download a file stream from a web server using CasperJS:
- the form is sent to the url
- url returns file stream
So far, I have confirmed that the correct form values are posted.
var casper = require('casper').create({ verbose: true, logLevel: 'debug', viewportSize: {width: 1440, height: 800}, pageSettings: { userName: '****', password: '****', webSecurityEnabled: false }, waitTimeout: 200000 }); casper.start("***"); casper.then(function() { var exportForm = this.evaluate(function() { return $("#export_pdf_form").serialize(); }); var exportAction = this.evaluate(function() { return $("#export_pdf_form").attr('action'); }); var url, file; url = '***' + exportAction; (eg. https:
Casper error "Unfortunately, casperjs cannot execute ajax requests for cross domains", followed by "XMLHttpRequest 101 exception". After searching, it indicates that setting the Internet security variable to false should do the job ... but it doesn’t. What else should I learn?
casperjs - v1.1.1 phantomjs - v2.0.0
source share