Skip to content

Commit 3a0db79

Browse files
committed
[rust] Enhance warning message when incompatible driver in PATH is found
1 parent 770d9d3 commit 3a0db79

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

rust/src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,17 +358,19 @@ pub trait SeleniumManager {
358358
// If proper driver version is not the same as the driver in path, display warning
359359
if !self.get_driver_version().is_empty() && !version.eq(self.get_driver_version()) {
360360
self.get_logger().warn(format!(
361-
"Incompatible release of {} (version {}) detected in PATH: {}",
361+
"The {} version ({}) detected in PATH at {} might not be compatible with the detected {} version ({}); it is recommended to delete the driver and retry",
362362
self.get_driver_name(),
363363
version,
364-
path
364+
path,
365+
self.get_browser_name(),
366+
self.get_browser_version()
365367
));
366368
}
367369
self.set_driver_version(version.to_string());
368370
return Ok(PathBuf::from(path));
369371
}
370372

371-
// If driver was not in the PATH, try to find it the cache
373+
// If driver was not in the PATH, try to find it in the cache
372374
let driver_path = self.get_driver_path_in_cache();
373375
if driver_path.exists() {
374376
if !self.is_safari() {

0 commit comments

Comments
 (0)