Forum Discussion

coffee's avatar
coffee
Contributor
8 years ago

How to grab the message in browser console (Chrome Developer Tools)

Hi,

 

I am wondering how can we write a Script in Javascript to grab the message in Browser Console.

So e.g. when trying to login to a webpage and login fails, the console will return some error message like this 

 

 

I would like to grab that line and put it in my txt log file. 

Is there any method to do that? 

 

Thank You.