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

Function json_output_test

rust/tests/output_tests.rs:26–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24
25#[test]
26fn json_output_test() {
27 let mut cmd = get_selenium_manager();
28 cmd.args(["--browser", "chrome", "--output", "json"])
29 .assert()
30 .success()
31 .code(0);
32
33 let stdout = get_stdout(&mut cmd);
34
35 let json: JsonOutput = serde_json::from_str(&stdout).unwrap();
36 assert!(!json.logs.is_empty());
37
38 let output_code = json.result.code;
39 assert_eq!(output_code, 0);
40
41 let driver = Path::new(&json.result.driver_path);
42 assert!(driver.exists());
43}
44
45#[test]
46fn shell_output_test() {

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected