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,420 points
99 views

1 answer to this question.

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,240 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
• 780 points
9,907 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
• 22,870 points
22 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
• 970 points
280 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,090 points
548 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
882 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
546 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,340 points
41 views