1

Is there a log function in Protractor that will add the log invocation to the control-flow?

Or is there a function that exposes the control-flow for me to leverage?

Clearly, console.log will log to the console outside of the control-flow (so at the "wrong" time).

Ben Aston
  • 53,718
  • 65
  • 205
  • 331

1 Answers1

3

You can get the control flow reference by calling:

browser.controlFlow()

Then you can e.g. call:

browser.controlFlow().execute(function () {
    console.log("foo");
});

See Protractor API entry for controlFlow.

Dzinx
  • 55,586
  • 10
  • 60
  • 78