0

Can someone share a code which stops ChromeDriver to display logs in console. These red color logs are taking lots of space.

Thanks

Mr.USA
  • 1
  • Hi Mr. USA, you want to elaborate a little more what you need. Provide a small sample of your code, the output you get and the output you want. Share what you tried. You will find SO quite helpful when asking with complete context – stwissel Apr 16 '20 at 21:13
  • See my and drunk cat's responses in this thread: https://stackoverflow.com/questions/52975287/selenium-chromedriver-disable-logging-or-redirect-it-java. You should be able to get rid of both the selenium and chromedriver output with those steps. – MetalRules May 30 '20 at 00:52

1 Answers1

2

I hope the code below helps you to get rid of those red-coloured 'logs':

System.setProperty("webdriver.chrome.silentOutput", "true");        
java.util.logging.Logger.getLogger("org.openqa.selenium").setLevel(Level.SEVERE);
Adrian Mole
  • 49,934
  • 160
  • 51
  • 83