From a0a39148452e35e8f4652ce29e2baba90b9a88d0 Mon Sep 17 00:00:00 2001 From: Diego Molina Date: Thu, 2 May 2024 10:57:01 +0200 Subject: [PATCH] [java] Improving logging to understand why "Value must be set" is raised. --- .../grid/node/config/DriverServiceSessionFactory.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/java/src/org/openqa/selenium/grid/node/config/DriverServiceSessionFactory.java b/java/src/org/openqa/selenium/grid/node/config/DriverServiceSessionFactory.java index b1ff2cec5b07f..7a803437b9c4a 100644 --- a/java/src/org/openqa/selenium/grid/node/config/DriverServiceSessionFactory.java +++ b/java/src/org/openqa/selenium/grid/node/config/DriverServiceSessionFactory.java @@ -33,6 +33,7 @@ import java.util.Set; import java.util.function.Function; import java.util.function.Predicate; +import java.util.logging.Level; import java.util.logging.Logger; import java.util.stream.Stream; import org.openqa.selenium.Capabilities; @@ -329,10 +330,11 @@ private Capabilities setBrowserBinary(Capabilities options, String browserPath) .setCapability(vendorOptionsCapability, vendorOptions) .setCapability("browserVersion", null); } catch (Exception e) { - LOG.warning( + LOG.log( + Level.WARNING, String.format( - "Exception while setting the browser binary path. %s: %s", - options, e.getMessage())); + "Exception while setting the browser binary path. Options: %s", options), + e); } } }