MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / config_test

Function config_test

rust/tests/config_tests.rs:33–64  ·  view source on GitHub ↗
(#[case] browser_name: String)

Source from the content-addressed store, hash-verified

31#[case("firefox")]
32#[case("edge")]
33fn config_test(#[case] browser_name: String) {
34 if is_linux_arm64() && browser_name.eq("edge") {
35 return;
36 }
37 let tmp_dir = Builder::new().prefix("sm-config-test").tempdir().unwrap();
38 let config_path = tmp_dir.path().join("se-config.toml");
39 let config_file = File::create(config_path.as_path()).unwrap();
40 let mut writer = BufWriter::new(config_file);
41 writer
42 .write_all(format!(r#"browser="{}""#, browser_name).as_bytes())
43 .unwrap();
44 writer.flush().unwrap();
45
46 let mut cmd = get_selenium_manager();
47 cmd.env_remove("SE_CACHE_PATH");
48 cmd.args([
49 "--output",
50 "json",
51 "--debug",
52 "--cache-path",
53 tmp_dir.path().to_str().unwrap(),
54 ])
55 .assert()
56 .success()
57 .code(0);
58
59 let stdout = get_stdout(&mut cmd);
60
61 assert!(!stdout.contains("WARN") && !stdout.contains("ERROR"));
62 assert_driver(&mut cmd);
63 assert_browser(&mut cmd);
64}

Callers

nothing calls this directly

Calls 12

is_linux_arm64Function · 0.85
createFunction · 0.85
get_selenium_managerFunction · 0.85
get_stdoutFunction · 0.85
assert_driverFunction · 0.85
assert_browserFunction · 0.85
prefixMethod · 0.80
codeMethod · 0.80
argsMethod · 0.80
pathMethod · 0.45
flushMethod · 0.45
successMethod · 0.45

Tested by

no test coverage detected