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).

4

1 回答 1

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.

于 2015-09-15T11:30:37.407 回答