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,460 points
434 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
29,724 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, 2019 in Selenium by Abha
• 28,040 points
232 views
0 votes
1 answer

How to hide the console of the ChromeDriver in python

Have you tried this one?  https://help.applitools.com/hc/en-u ...READ MORE

answered Feb 16, 2020 in Selenium by Klinsc
5,705 views
0 votes
0 answers
0 votes
1 answer
0 votes
2 answers

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,520 points
5,308 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,050 points
5,990 views
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,890 points
3,710 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 2, 2020 in Selenium by Sri
• 3,050 points
4,501 views