Wait don't work in a function ?

42 views
Skip to first unread message

Pm Gs

unread,
Jul 2, 2015, 4:00:53 PM7/2/15
to casp...@googlegroups.com
hello,

I don't understand why the pg freezes on the line : this.wait(2000, function() {

- Output ------------------------------------------------------------------------
I've waited for a  second.
I've waited for a second second!
Wait 2 s
...

- the code ----------------------------------------------------------------------
var casper = require('casper').create();

casper.start('http://google.com/')

casper.wait(1000, function() {
        this.echo("I've waited for a  second.");
        this.wait(1000, function() {
                this.echo("I've waited for a second second!");
        });
});

casper.run(function() {
        this.echo("Wait 2 s");
        this.wait(2000, function() {
                this.echo("I've waited for two seconds.");
        });;
});

Pm Gs

unread,
Jul 2, 2015, 4:43:01 PM7/2/15
to casp...@googlegroups.com
First analyser :
casperjs selftest ->

FAIL SyntaxError: Unexpected string 'handling waits and timeouts'

For information, my system :
Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u2 x86_64 GNU/Linux

Pm Gs

unread,
Jul 3, 2015, 1:59:26 AM7/3/15
to casp...@googlegroups.com
2nd analyse.

casperjs flow.coffee

Warning PhantomJS v2.0 not yet released. There will not be any official support for any bugs until stable version is released!

SyntaxError: Unexpected string 'handling waits and timeouts'

  flow.coffee:1 in injectJs
  .../casperjs/bin/bootstrap.js:416

casperjs --engine=slimerjs flow.coffee

Script Error: Permission denied to access property "source"

Reply all
Reply to author
Forward
0 new messages