I am using:
I have tried
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("webdriver.log.browser.ignore", true);
profile.setPreference("webdriver.log.driver.ignore", true);
profile.setPreference("webdriver.log.profiler.ignore", true);
FirefoxDriver driver = new FirefoxDriver();
and
LoggingPreferences preferences = new LoggingPreferences();
preferences.enable(LogType.BROWSER, Level.OFF);
preferences.enable(LogType.CLIENT, Level.OFF);
preferences.enable(LogType.DRIVER, Level.OFF);
preferences.enable(LogType.PERFORMANCE, Level.OFF);
preferences.enable(LogType.SERVER, Level.OFF);
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability(CapabilityType.LOGGING_PREFS, preferences);
FirefoxDriver driver = new FirefoxDriver(capabilities);
neither of these methods does anything to stop logging. Here is console output if that helps somehow:
For those wondering, i have log4j 1.2.17 in my pom.xml
but have no log4j.properties
or log4j.xml
and I do not use it at all.
To clarify: when I say logging I mean the console output in IntelliJ IDEA. I am using Java.
To not see the logs in the console you can use the following:
System.setProperty("webdriver.gecko.driver","src/main/resources/drivers/geckodriver.exe");
System.setProperty(FirefoxDriver.SystemProperty.DRIVER_USE_MARIONETTE,"true");
System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE,"/dev/null");
return new FirefoxDriver();