Skip to content

Commit 848df8b

Browse files
committed
[rust] Check browser path exists in test
1 parent d8f156b commit 848df8b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rust/tests/browser_tests.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ use crate::common::{assert_output, get_selenium_manager, get_stdout};
2020
use exitcode::DATAERR;
2121
use rstest::rstest;
2222
use std::env::consts::OS;
23+
use std::path::Path;
2324

2425
mod common;
2526

@@ -134,7 +135,7 @@ fn invalid_geckodriver_version_test() {
134135
r"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
135136
)]
136137
fn browser_path_test(#[case] os: String, #[case] browser: String, #[case] browser_path: String) {
137-
if OS.eq(&os) {
138+
if OS.eq(&os) && Path::new(&browser_path).exists() {
138139
let mut cmd = get_selenium_manager();
139140
cmd.args(["--browser", &browser, "--browser-path", &browser_path])
140141
.assert()

0 commit comments

Comments
 (0)