protractor Understanding the Control Flow


Consider the following test:

it('should test something', function() {



In the following test, when the console.log() is executed and you see HERE on the console, none of the Protractor commands from previous lines have been executed. This is an entirely asynchronous behavior. The commands are represented as promises and were put on the Control Flow which would execute and resolve the promises sequentially, one by one.

See more at Promises and the Control Flow.