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

Function cache_path_test

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

Source from the content-addressed store, hash-verified

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

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