Path: csiph.com!aioe.org!.POSTED!not-for-mail From: Simonex Newsgroups: it.comp.lang.javascript Subject: usare casperjs Date: Fri, 8 Sep 2017 10:17:24 +0200 Organization: Aioe.org NNTP Server Lines: 34 Message-ID: NNTP-Posting-Host: v0B4mMXI2/gUutNXgQ17yw.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Language: it-IT X-Mozilla-News-Host: news://46.165.242.91:119 Xref: csiph.com it.comp.lang.javascript:8220 Premetto che con JS mi cimento da pochissimo tempo, quindi perdonate l'inesperienza. Dunque... + cat casper.js var casper = require('casper').create(); casper.start('http://casperjs.org/'); casper.then(function() { this.assertTitle('casper'); this.echo('First Page: ' + this.getTitle()); }); casper.thenOpen('http://phantomjs.org', function() { this.echo('Second Page: ' + this.getTitle()); this.click('DOCUMENTATION'); this.clickLabel('DOCUMENTATION'); }); casper.run(); + casperjs casper.js TypeError: undefined is not a function (evaluating 'this.assertTitle('casper')') Second Page: PhantomJS | PhantomJS CasperError: Cannot dispatch mousedown event on nonexistent selector: DOCUMENTATION Come vedete ci sono un po' di errori, perchè?