Vladimir G.
Vladimir G.

Reputation: 885

Current navigation step

Is there a easy way to get current navigation step inside casper script (like in debug output: "Step xx/yy done in ZZZms"). Or only way is count steps by myself?
Thanks

Upvotes: 0

Views: 160

Answers (1)

Artjom B.
Artjom B.

Reputation: 61892

No, CasperJS doesn't keep track of step execution time or current step index. You either do it yourself or monkey-patch the casper instance. If you decide to do it yourself

  • you can time the step in question from the surrounding steps or
  • use step.start, step.complete, step.error and step.timeout events. This will not work correctly, because step.complete is not emitted for casper.start or casper.thenOpen, but step.start is.

Upvotes: 1

Related Questions