Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > it.comp.lang.javascript > #8220
| From | Simonex <simo@sumo.it> |
|---|---|
| Newsgroups | it.comp.lang.javascript |
| Subject | usare casperjs |
| Date | 2017-09-08 10:17 +0200 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <ootjmk$mub$1@gioia.aioe.org> (permalink) |
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è?
Back to it.comp.lang.javascript | Previous | Next — Next in thread | Find similar
usare casperjs Simonex <simo@sumo.it> - 2017-09-08 10:17 +0200 Re: usare casperjs Simonex <simo@sumo.it> - 2017-09-11 11:18 +0200
csiph-web