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
1,053 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
41,837 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,140 points
816 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
9,979 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,500 points
13,674 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,190 points
9,143 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,910 points
7,221 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 3, 2020 in Selenium by Sri
• 3,190 points
7,875 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP