SHOW:
|
|
- or go back to the newest paste.
1 | var casper = require('casper').create(); | |
2 | ||
3 | casper.start("http://www.google.com"); | |
4 | ||
5 | function runCode() { | |
6 | ||
7 | console.log("in runcode"); | |
8 | ||
9 | casper.then(function(){ | |
10 | if (true){ | |
11 | console.log("about to invoke setTimeout function"); | |
12 | setTimeout(runCode, 1000); | |
13 | } | |
14 | }); | |
15 | //casper.then(function(){ | |
16 | - | casper.wait(4000); |
16 | + | // casper.wait(4000); |
17 | - | }) |
17 | + | //}) |
18 | - | //casper.wait(4000); |
18 | + | casper.wait(4000); |
19 | } | |
20 | ||
21 | casper.then(function(){ | |
22 | runCode(); | |
23 | }); | |
24 | ||
25 | casper.run(); |