Chrome's console log

0 votes
I want to build an automation testing, so I have to know the errors that appear in the console of chrome.

Is there an option to get the error lines that appear in the console of the Chrome?
May 18, 2018 in Selenium by Meci Matt
• 9,400 points
61 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

You can get logs using the following code:

Driver().Manage().Logs.GetLog();

You can specify what log you are interested in and then you can get the browser log, use the below code:

Driver().Manage().Logs.GetLog(LogType.Browser);

Also, don't forget to set up your driver accordingly:

ChromeOptions options = new ChromeOptions();
options.SetLoggingPreference(LogType.Browser, LogLevel.All);
driver = new ChromeDriver("path to driver", options);
answered May 18, 2018 by Atul
• 10,200 points

Related Questions In Selenium

+2 votes
1 answer

I want the console.log output from Chrome. I'm working with selenium on Python

So this is how you do it ...READ MORE

answered May 3, 2018 in Selenium by sniffy_god
• 760 points
5,368 views
0 votes
1 answer

How to do api log validation in selenium

Hey Gopi, API log Validation is not ...READ MORE

answered May 15 in Selenium by Abha
• 6,370 points
10 views
0 votes
0 answers

How to hide the console of the ChromeDriver in python

I'm currently using the chrome driver in ...READ MORE

May 15 in Selenium by Surya
• 820 points
15 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,030 points
71 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
442 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
55 views
0 votes
1 answer

Python using basicConfig method to log to console and file

I can't reproduce it on Python 3.3. ...READ MORE

answered Aug 14, 2018 in Python by ariaholic
• 7,320 points
24 views
0 votes
1 answer

Python using basicConfig method to log to console and file

Try this working fine(tested in python 2.7) ...READ MORE

answered Aug 27, 2018 in Python by Priyaj
• 56,120 points
382 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.