tikiwiki/packages/tiki-pkg-casperjs/jerome-breton/casperjs/samples/each.js

22 lines
412 B
JavaScript
Raw Normal View History

2023-11-20 21:52:04 +01:00
/*eslint strict:0*/
/*global CasperError, console, phantom, require*/
require = patchRequire(require);
var casper = require("casper").create();
var links = [
"http://google.com/",
"http://yahoo.com/",
"http://bing.com/"
];
casper.start();
casper.each(links, function(self, link) {
this.thenOpen(link, function() {
this.echo(this.getTitle() + " - " + link);
});
});
casper.run();