Where to find chromedriver.log in selenium using c#. Where can i see the log file of chromedriver? Where to find chromedriver.log in selenium using c#. Where can i see the log file of chromedriver? selenium selenium

Where to find chromedriver.log in selenium using c#. Where can i see the log file of chromedriver?


I think what you're looking for is something like this:

var optn = new ChromeOptions();var service = ChromeDriverService.CreateDefaultService(@"D:\Driver\"); service.LogPath = "chromedriver.log";service.EnableVerboseLogging = true;var driver = new ChromeDriver(service, optn);driver.Navigate().GoToUrl("https://www.google.co.in/?gfe_rd=cr&ei=aWh0U7WHEJGAuASTuYHIAQ");

The ChromeOptions is for the browser process itself. Logging goes to the ChromeDriver by setting the ChromeDriverService variables.


I've found that it works if you remove the "--" from your arguments. The library code must be adding them. So your code should look like this..

ChromeOptions optn= new ChromeOptions();optn.AddArgument("verbose");optn.AddArgument("log-path=D:\\chromedriver.log");var driver = new ChromeDriver(@"D:\Driver\",optn);driver.Navigate().GoToUrl("https://www.google.co.in/?gfe_rd=cr&ei=aWh0U7WHEJGAuASTuYHIAQ");


Most easy solution will be -

System.setProperty("webdriver.chrome.logfile", "D:\\chromedriver.log");