disclaimer: All the answers I found at the thread over here are not working for the casperjs and phantomjs-versions are newer (at least I think that's the cause).
So... I've created a bunch of tests using the latest version of casperjs from its master-branch - NOT(!) the one aquired via download-link, for I needed to use phantomjs 2.0 due to some bugs with the 1.9.8 version preventing me to do my tests. I'm on a win7 64bit environment.
It all worked out very well, but now I'm trying to automate the execution of the tests via a batch-file as described in the thread I mentioned in the disclaimer - so that I don't have the PATH-variable.
I tried to use the following script alongside with putting the phantomjs-file together with my casperjs-file in the rootdirectory:
@ECHO OFF
set CASPER_PATH=%~dp0
set CASPER_BIN=%CASPER_PATH%\bin\
set ARGV=%*
call phantomjs "%CASPER_BIN%bootstrap.js" --casper-path="%CASPER_PATH%" --cli %ARGV%
This is my filestructure so far:
While starting the batch, I always face the following error: CasperError: Cannot find package.json at C:\package.json
And I have no clue how to change this anymore. Hope anyone could help me out here!