Artificial intelligent assistant

CasperJSでエラー発生時に処理を継続させたい `#hoge``#economy` var casper = require('casper').create(); casper.start(' casper.then(function(){ this.echo(this.getElementInfo('#topics').html); //#topics this.echo(this.getElementInfo('#hoge').html); //#hoge this.echo(this.getElementInfo('#economy').html); //#economy }); casper.run(function(){ this.exit; });

casper.exists


diff --git a/test.js b/test.js
index e4c0fb2..9d75a06 100644
--- a/test.js
+++ b/test.js
@@ -3,7 +3,9 @@ casper.start('

casper.then(function(){
this.echo(this.getElementInfo('#topics').html); //#topics
- this.echo(this.getElementInfo('#hoge').html); //#hoge
+ if (this.exists('#hoge')) {
+ this.echo(this.getElementInfo('#hoge').html); //#hoge
+ }
this.echo(this.getElementInfo('#economy').html); //#economy
});

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy f9ba17dc3c54da8370dbe27ccc7d8d0e