I am trying to automate the download of a CSV file by using PhantomJS to click on an object on a website.
function() {
(page.evaluate(function() {
$("export2csv").click();
}))
}
If I run this in the Chrome dev-console a CSV file starts downloading.
Chrome displays blob:https://website/seeminglyrandomstring
as its source, which means I have no static URL pointing to this file.
If I run it in PhantomJS however, there is no output, just like it finished without any errors. But neither do I get my file. Has this anything to to with the following statement in the official documentation?
The execution is sandboxed, the web page has no access to the phantom object and it can’t probe its own setting.
I am using PhantomJS 2.0.0 on Windows