Closed rayferns closed 8 years ago
You have two before_capture hooks in one YAML file - there should only be one
before_capture: 'javascript/wait--casper.js'
before_capture: 'javascript/disable_javascript_and_cookies--casperjs'
Regardless, you'd have to find a casper command which disables cookies (I'm not sure this exists, so consider switching to Phantom, where it does exist).
These links are relevant:
Good luck!
For anyone else who finds this, it appears that casper.options.pageSettings.javascriptEnabled = false;
disables the critical CasperJS / PhantomJS functionality and causes the screenshot to fail.
See
I'm trying to disable some annoying cookies & javascript for a webpage that keeps popping up on the results gallery window. I thought I'd add the javascript\disable_javascript--casper.js file, that didn't work. So I created my own file: javascript\disable_javascript_and_cookies--casperjs.js with an extra line:
casper.cookiesEnabled = false;
This did not work either, not sure what is the best option. Please advise.
I managed to get this working for PhantomJS using the following commands:
This works fine on snapped images, but not for CasperJS. Nothing loads up for CasperJS gallery images. Details below:
Any help appreciated.
Thanks,
Reporting a problem? Please describe the issue above, and complete the following checklist so that we can help you more quickly.
Issue checklist:
verbose: true
to my config) and pasted the output below:Javascript file:
'javascript/disable_javascript_and_cookies--casperjs'