Sometimes I get weird errors in my tests and I want to debug it. I try and do this with things like getAttribute() or getText() but these functions return a promise. I find it hard to resolve the promise without having to do an expect. Take this example:
console.log(servicePage.services.get(0).getAttribute('class'));
I was hoping that it would just output the value of the class but a promise is returned. How can I get this promise resolved? I tried using the then(function(elem)... function but what to do next? When I perform an action like getText() on elem, I am again stuck with a promise.
Thanks in advance! Regards