Crates.io | siderunner |
lib.rs | siderunner |
version | 0.2.0 |
source | src |
created_at | 2021-07-04 13:10:58.164828 |
updated_at | 2021-07-10 12:43:31.884933 |
description | A library for execution of .side files produced by Selenium IDE |
homepage | https://github.com/Plato-solutions/siderunner |
repository | https://github.com/Plato-solutions/siderunner |
max_upload_size | |
id | 418572 |
size | 365,884 |
A library for parsing and running selenium .side
files used in a Selenium IDE
.
To run a file you should initially parse it and then you can run a test by its index.
use siderunner::{parse, Runner};
use thirtyfour::{DesiredCapabilities, WebDriver};
use serde_json::json;
let wiki = std::fs::File::open("examples/wiki.side").expect("Can't open a side file");
let file = parse(wiki).expect("parsing can't be done...");
let client = WebDriver::new("http://localhost:4444", DesiredCapabilities::firefox())
.await
.expect("can't connect to webdriver");
let mut runner = Runner::new(&client);
runner.run(&file).await.expect("Error occured while running a side file");
assert_eq!(
runner.get_value("slogan"),
Some(&json!("The Free Encyclopedia")),
);
runner.close().await.unwrap();
A .side
file for the example can be found in example directory.
siderunner
supports 2 backends:
thirtyfour
- defaultfantoccini
You can tweak fantoccini
backend by providing a feature fantoccini_backend
and turn off default features, default-features = false
Selenium IDE
supports the following commands.
cargo test --lib
To run a integration test suit you must set an environment.
You can use test.bash
file to run tests and manage the environment.
Just run it.
./test.bash
docker-compose
All contributions are welcomed.
I would recomend to start by tackling some of not implemented commands. And there's one more good place to start is fantoccini
backend, as it got a bit outdated as there's a bunch of not implemented commands there compared to default backend.
There might be something to do in the backend repos so you can help them out as well.