1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
//! The library provides interface for parsing and running `.side` files
//! which are produced in comparable way as [`Selenium IDE`] does.
//!
//! # Example
//! ```
//! use siderunner::{parse, Runner};
//! use thirtyfour::{DesiredCapabilities, WebDriver};
//!
//! #[tokio::main]
//! async fn main() {
//! let wiki = std::fs::File::open("examples/wiki.side").expect("Can't open a side file");
//! let file = parse(wiki).expect("Failed parsing a file");
//!
//! let client = WebDriver::new("http://localhost:4444", DesiredCapabilities::chrome())
//! .await
//! .expect("can't connect to webdriver");
//! let mut runner = Runner::new(&client);
//! runner.run(&file).await.expect("Fail in running first test");
//!
//! assert_eq!(
//! runner.get_data().get("slogan"),
//! Some(&serde_json::json!("The Free Encyclopedia")),
//! );
//!
//! runner.close().await.expect("Error occured while closing webdriver");
//! }
//! ```
//!
//! [`Selenium IDE`]: https://www.selenium.dev/selenium-ide/
pub use ;
pub use ;
/// Runner responsible for running a [`Test`](./struct.Test.html)
/// and collecting data.
pub type Runner = Runner;
/// Runner responsible for running a [`Test`](./struct.Test.html)
/// and collecting data.
pub type Runner<'a> = Runner;