Output into file

2017-07-05  本文已影响9人  RoyTien
(function() {
  fs = require("fs");
  path = 'file.txt';

  casper = require('casper').create({});

  casper.start(URL, function() {
    fs.write(path, object, 'a');
    fs.write(path, "\n", 'a');
  });
  casper.run(function() {
    this.echo(Date.now()-start + "ms");
    this.echo("Finished running ...");
    return this.exit();
  });
}).call(this);
上一篇下一篇

猜你喜欢

热点阅读