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

Function cache_path_test

rust/tests/cache_tests.rs:30–52  ·  view source on GitHub ↗
(#[case] tmp_cache_folder_name: String)

Source from the content-addressed store, hash-verified

28#[case("../áèîö")]
29#[case("../テスト")]
30fn cache_path_test(#[case] tmp_cache_folder_name: String) {
31 let mut cmd = get_selenium_manager();
32 cmd.env_remove("SE_CACHE_PATH");
33 cmd.args([
34 "--browser",
35 "chrome",
36 "--cache-path",
37 &tmp_cache_folder_name,
38 "--output",
39 "json",
40 ])
41 .assert()
42 .success()
43 .code(0);
44
45 let driver_path = get_driver_path(&mut cmd);
46 println!("*** Custom cache path: {}", driver_path);
47 assert!(!driver_path.contains(r"cache\selenium"));
48
49 let tmp_cache_path = Path::new(&tmp_cache_folder_name);
50 fs::remove_dir_all(tmp_cache_path).unwrap();
51 assert!(!tmp_cache_path.exists());
52}

Callers

nothing calls this directly

Calls 5

get_selenium_managerFunction · 0.85
get_driver_pathFunction · 0.85
codeMethod · 0.80
argsMethod · 0.80
successMethod · 0.45

Tested by

no test coverage detected