-1

.

Here are these logs that are continuously coming till the end line of code and its very irritating. i need help to turn off these logs

  • Possible duplicate of [How to set verbosity of marionette driver?](https://stackoverflow.com/questions/46002918/how-to-set-verbosity-of-marionette-driver) – undetected Selenium Oct 07 '17 at 15:19

2 Answers2

0

this is an issue of selenium 3.01 and above. I have read it from this link:

You can use LoggingPreferences class and enable the properties. Try this answer it may helps you:

iamsankalp89
  • 4,607
  • 2
  • 15
  • 36
0

Create a windows batch file with below commands and provide that batch file as a parameter while setting the gecko driver property. Please see the below code.

Batch File as gecko.bat:

@ECHO OFF
C:\Selenium\****\geckodriver.exe --log fatal %* > NUL 2>&1

Set Gecko driver system property in the script before initializing the Firefox driver. Please see below

System.setProperty("webdriver.gecko.driver","C:/Selenium/***/gecko.bat");
WebDriver driver = new FirefoxDriver();

In the above code C:\Selenium\****\geckodriver.exe is the path of the geckodriver.exe in your PC and C:/Selenium/***/gecko.bat is the path of the batch you created and saved on your PC.

This will work for sure. All the best.