casperjs中start方法的使用方法总结

来源:互联网 发布:博士申请自述知乎 编辑:程序博客网 时间:2024/05/16 02:41


Signature: start(String url[, Function then])

Configures and starts Casper, then opens the provided url and optionally adds the step provided by the then argument:

casper.start('http://google.fr/', function() {this.echo("I'm loaded.");});casper.run();

也可以:

casper.start('http://google.fr/');casper.then(function() {       this.echo("I'm loaded.");});casper.run();

另外还可以:

casper.start('http://google.fr/');casper.then(function() {casper.echo("I'm loaded.");});casper.run();

You must call the start() method in order to be able to add navigation steps and run the suite. If you don’t
you’ll get an error message inviting you to do so anyway.








2 0
原创粉丝点击