Path: csiph.com!aioe.org!.POSTED!not-for-mail From: Simonex Newsgroups: it.comp.lang.javascript Subject: Re: usare casperjs Date: Mon, 11 Sep 2017 11:18:41 +0200 Organization: Aioe.org NNTP Server Lines: 37 Message-ID: References: NNTP-Posting-Host: DiGPMIxJ2bTiobZVjLcbpw.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 Content-Language: it-IT X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com it.comp.lang.javascript:8221 Il 08/09/2017 10:17, Simonex ha scritto: > 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è? Niente?