I try this very simple script :
debugger;
var casper = require('casper').create();
casper.on('remote.message', function(msg) {
this.echo('remote: ' + msg);
})
casper.start('http://stackoverflow.com');
casper.thenEvaluate(function(){
var ps = document.querySelectorAll('*');
console.log("DEBUG ps.length="+ps.length);
})
casper.run(function() {
this.exit();
});
then I run
casperjs --remote-debugger-port=9035 script.js
Then I open http://127.0.0.1:9035 in chrome, click on the bootstrap.js
link, then open console
tab, type __run()
, but all get hangs.
Is this feature supposed to work properly ?