Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var casper = require('casper').create();
- casper.start("http://www.google.com");
- function runCode() {
- console.log("in runcode");
- casper.then(function(){
- if (true){
- console.log("about to invoke setTimeout function");
- setTimeout(runCode, 1000);
- }
- });
- //casper.then(function(){
- // casper.wait(4000);
- //})
- casper.wait(4000);
- }
- casper.then(function(){
- runCode();
- });
- casper.run();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement