failed to save screenshot to a location in casperjs (windows7 64 bit)

Viewed 2143

When trying to capture a screenshot and save it in casperjs, it throws the following error

[error] [phantom] Failed to save screenshot to a local directory. please check permissions

Tried lot of ways like

  • saving it to other locations like public directory
  • changing the permissions of the local directory.
  • running the process as an administrator.

I am using Windows 7 64 bit machine.

Already gone through this link here

6 Answers

Sometimes a file with the same name already exists, and is opened by a program (image viewer) so casperjs/phantomjs can't delete it before rewriting.

Related