Expand description
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");
}Structs§
- Command
- File
- File represent a
Sidefile information - Runner
Error - RunnerError represents a Error which may occure while running
running
Command. - Test
- The structure represent a selenium test
Enums§
- Parse
Error - ParseError represents errors which may occure while
parsing a
Sidefile.
Functions§
- parse
- Parse .side format into rust representation