Capture console.log in your Protractor Tests

This post is part of a ten-part series on how to write better Protractor tests. You can find the rest of the series here.

If you’re anything like me, your code probably has zillions of console.log everywhere. When we’re testing with Protractor it can feel a bit like flying blind without being able to read those messages; especially when something goes wrong.

You can save your browsers logs from your Protractor test like this:

Learn Protractor in a few hours with our online course

Protractor is a one of the best ways to ensure your app is working correctly because you can write code that acts like a real user. But Protractor can also be confusing and difficult to work with when you're just starting out. We've put together an online course that will help you become a master at Protractor.

You'll save tons of time and frustration learning Protractor because we've worked out everything you need to know. Become a Protractor testing master today!