Debug Protractor Test case in IntelliJ using Intellij JavaScript debugger Debug Protractor Test case in IntelliJ using Intellij JavaScript debugger selenium selenium

Debug Protractor Test case in IntelliJ using Intellij JavaScript debugger


Protractor heavily relies on a concept of promises. To see the actual values of the element's text or attributes, you need to resolve them using then(). Example:

element(by.id('#myId')).then(function(elm) {    elm.getText().then(function (text) {        console.log(text);  // put a breakpoint here    });  });

or:

lblInvalidLoginMsg.getAttribute('value').then(function(value) {    console.log(value);  // value here would contain an actual attribute value});

Also, when the protractor is paused for debugging, you can use browser developer tools and call protractor's injected client-side script commands, see:

See also: