This works for Casper JS and it is obvious from the code that this will work.
It doesn't seem to work for Phantom JS though and the code looks like it will only fall back on the binary if the node module is not found.
I quickly hacked tasks/lib/casper.js like below, which worked, but probably a better way:
//npm install wrapper
if (process.env["PHANTOMJS_EXECUTABLE"] && fs.existsSync(process.env["PHANTOMJS_EXECUTABLE"])) {
var phantomjs = process.env["PHANTOMJS_EXECUTABLE"];
} else {
var phantomjs = require('phantomjs');
}
It would be great if this could be fixed so that you can specify the binary as an override and not a fallback. As a bonus it would be good if SlimerJS could be overwritten too.
The README says you can override the Casper/Phantom binaries like this:
This works for Casper JS and it is obvious from the code that this will work.
It doesn't seem to work for Phantom JS though and the code looks like it will only fall back on the binary if the node module is not found.
I quickly hacked tasks/lib/casper.js like below, which worked, but probably a better way:
It would be great if this could be fixed so that you can specify the binary as an override and not a fallback. As a bonus it would be good if SlimerJS could be overwritten too.