0

Is there a way to suppress output from the web driver - e.g.

Feb 09, 2023 1:22:13 PM org.openqa.selenium.chromium.ChromiumDriver lambda$new$3
WARNING: Unable to find version of CDP to use for . You may need to include a dependency on a specific version of the CDP using something similar to `org.seleniumhq.selenium:selenium-devtools-v86:4.7.2` where the version ("v86") matches the version of the chromium-based browser you're using and the version number of the artifact is the same as Selenium's.
Feb 09, 2023 1:22:14 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
WARNING: Unable to find CDP implementation matching 110
Feb 09, 2023 1:22:14 PM org.openqa.selenium.chromium.ChromiumDriver lambda$new$3
WARNING: Unable to find version of CDP to use for . You may need to include a dependency on a specific version of the CDP using something similar to `org.seleniumhq.selenium:selenium-devtools-v86:4.7.2` where the version ("v86") matches the version of the chromium-based browser you're using and the version number of the artifact is the same as Selenium's.
ChromeDriver was started successfully.
ChromeDriver was started successfully.
ChromeDriver was started successfully.
ChromeDriver was started successfully.
ChromeDriver was started successfully.
ChromeDriver was started successfully.
ChromeDriver was started successfully.

1 Answers1

0

If this is really what you want:

  1. Add a setUp Thread Group to your Test Plan

  2. Add JSR223 Sampler to the Thread Group

  3. Put the following code into "Script" area:

    java.util.logging.LogManager.getLogManager().reset()
    def globalLogger = java.util.logging.Logger.getLogger(java.util.logging.Logger.GLOBAL_LOGGER_NAME)
    globalLogger.setLevel(java.util.logging.Level.OFF)
    

Next time you run your test all Selenium-related logging will go away.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • will this also turn off the logging for jmeter itself? –  Feb 10 '23 at 03:14
  • no, you asked about webdriver - the instructions are for webdriver. JMeter has its own separate logging configuration via [log4j2.xml](https://logging.apache.org/log4j/2.x/manual/configuration.html) in its bin folder where you can set log level for individual components of the overall. More information: [How to Configure JMeter Logging](https://www.blazemeter.com/blog/jmeter-logging) – Dmitri T Feb 10 '23 at 06:15
  • tried this, it didnt work. thank you tho! –  Feb 10 '23 at 19:36