I've read the Casper documentation and they say that ALL PhantonJS cli options is available on CasperJS but I am trying to use --config=/path/to/config.json and is not working.
Is there a way to fix this or do something similar since I don't want to be editing the configs on terminal.
casperjs --config=config.json test.js
My config.json file:
{
"load-images" : false
}
My test.js file:
var casper = require('casper').create();
casper.start('http://www.example.com/', function(){
this.capture('image.png');
})
.run();
That code above is loading the images. Of course this is a simple example and what I want to is manage lots of options inside the config file.
Thanks
This issue shows the inconsistencies:
But
autoLoadImages
is broken. I just verified thatwebSecurityEnabled
works as expected.PhantomJS version 1.9.7.
A workaround would be to include the following code in every test file:
and call it with the other command line flag