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.
New Selenium IDE After the execution of tests, there are logs generated because of Firefox logging in with geckodriver. This log generation by Firefox can be disabled by certain parameters setting. We can stop these logs from being recorded in the console and capture them in a different file.
Selenium users must update to version 3.11 or later to use geckodriver.
GeckoDriver is a web browser engine which is used in many applications developed by Mozilla Foundation and the Mozilla Corporation. GeckoDriver is the link between your tests in Selenium and the Firefox browser. GeckoDriver is a proxy for using W3C WebDriver-compatible clients to interact with Gecko-based browsers.
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();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With