ebrehault / resurrectio

CasperJS test recorder Chrome extension
GNU General Public License v2.0
721 stars 106 forks source link

CasperError: Casper not started; please use Casper#start #3

Closed jean closed 10 years ago

jean commented 12 years ago

Running a test fails:

$ phantomjs --version
1.5.0
$ casperjs --version
0.6.10
$ casperjs ~/tmp/mytest.js
FAIL CasperError: Casper not started; please use Casper#start
#    type: uncaughtError
#    error: "CasperError: Casper not started; please use Casper#start"
CasperError: Casper not started; please use Casper#start
  /home/jean/repos/git/casperjs:1003 in then
  /home/jean/tmp/mytest.js:7
  /home/jean/repos/git/casperjs/bin/bootstrap.js:271 in initCasperCli
  /home/jean/repos/git/casperjs/bin/bootstrap.js:284
ebrehault commented 12 years ago

can you show me your test.js ?

rapidrapids commented 11 years ago

I had a similar issue, but the test.js just had this at the top:-

ERROR: the recorded sequence does not start with a url openning.

which simply needs replacing with casper.start('http://targeturl.com');

mallim commented 11 years ago

Any solution for this error? The error also appear in the master branch

ERROR: the recorded sequence does not start with a url openning.
ebrehault commented 11 years ago

you can fix the resulting script by adding casper.start('http://targeturl.com'); as @beardtwizzle said

avoiding to generate the script with this error should be quite easy, but I would need to be able to reproduce it, so if you can describe a way to produce it, please post it here.

zittix commented 10 years ago

I am able to reproduce this bug:

  1. Open a blank chrome tab (without any website loaded, by default it loads Google Search from chrome with the URL chrome-search://local-ntp/local-ntp.html)
  2. Click the resurrectio button and enter the URL of a website
  3. Click go and do your tests.
  4. Click stop recording
  5. Your test will have the casper.start line missing.