Skip to content

Commit c806757

Browse files
authored
[rust] Fix webview2 support when browser path is set (#13204)
1 parent dde3eed commit c806757

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rust/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ pub trait SeleniumManager {
483483
} else {
484484
self.set_browser_version(discovered_version);
485485
}
486-
if self.is_webview2() {
486+
if self.is_webview2() && PathBuf::from(self.get_browser_path()).is_dir() {
487487
let browser_path = format!(
488488
r#"{}\{}\msedge{}"#,
489489
self.get_browser_path(),
@@ -1029,7 +1029,7 @@ pub trait SeleniumManager {
10291029
let mut commands = Vec::new();
10301030

10311031
if WINDOWS.is(self.get_os()) {
1032-
if !escaped_browser_path.is_empty() && !self.is_webview2() {
1032+
if !escaped_browser_path.is_empty() {
10331033
let wmic_command =
10341034
Command::new_single(format_one_arg(WMIC_COMMAND, &escaped_browser_path));
10351035
commands.push(wmic_command);

0 commit comments

Comments
 (0)