Reputation: 667
I have a CasperJS script I am trying to run and take screenshots, but it seems to only ever open 'about:blank' when run.
Below is a link to the script I am trying to use if anyone can tell me where I am going wrong,
thanks.
http://jsbin.com/ujuret/2/edit
Upvotes: 0
Views: 3248
Reputation: 8768
Your code works for me if I remove url
from screenshot filename. I replaced:
this.capture(savePath + "/"+ url + breakpoints[currentBreakpoint - 1][0] + ".png");
with:
this.capture(savePath + "/" + breakpoints[currentBreakpoint - 1][0] + ".png");
and got 3 files for different resolution.
It seems you need to escape url
properly before using it as a part of a filename.
Upvotes: 1