问题
Can someone share a code which stops ChromeDriver to display logs in console. These red color logs are taking lots of space.
Thanks
回答1:
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);
来源:https://stackoverflow.com/questions/61253792/java-code-to-stop-seeing-detailed-logs-in-chromedriver