-
-
Notifications
You must be signed in to change notification settings - Fork 690
Description
If I call
WebDriverManager.chromedriver().setup();
the discovered browser version, and downloaded/located driver version are printed to the log, like this:
Using chromedriver 132.0.6834.159 (resolved driver for Chrome 132)
this happens here:
webdrivermanager/src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java
Lines 1244 to 1249 in 739aa06
if (optionalDriverVersion.isPresent()) { | |
driverVersion = optionalDriverVersion.get(); | |
log.info("Using {} {} (resolved driver for {} {})", | |
getDriverName(), driverVersion, | |
getDriverManagerType().getBrowserName(), | |
resolvedBrowserVersion); |
If I want programmatic access to these versions, for instance, to expose to monitoring instrumentation or print in an after-execution report, they seem to be very hard to get to. This log statement is buried in the middle of a protected method with a lot of other responsibilities.
getDriverVersion()
and getBrowserVersion()
are also protected methods. I've tried calling getChromeDriverVersion()
on the Config
object, and it always seems to return an empty string. What am I missing here? How can I get access to the same values that were logged?