[![Build Status](https://img.shields.io/github/workflow/status/Plato-solutions/siderunner/Continuous%20integration?style=flat-square)](https://github.com/Plato-solutions/siderunner/actions) [![Crates.io](https://img.shields.io/crates/v/siderunner.svg?style=flat-square)](https://crates.io/crates/siderunner) [![Docs.rs](https://img.shields.io/badge/docs.rs-siderunner-blue?style=flat-square)](https://docs.rs/siderunner) [![CodeCov](https://img.shields.io/codecov/c/github/Plato-solutions/siderunner/master?style=flat-square)](https://app.codecov.io/gh/Plato-solutions/siderunner) [![License:MPL-2.0](https://img.shields.io/badge/License-MPL_2.0-yellow.svg?style=flat-square)](https://opensource.org/licenses/MPL-2.0)

Siderunner

A library for parsing and running selenium .side files used in a [Selenium IDE].

Get started

To run a file you should initially parse it and then you can run a test by its index.

```rust 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");

asserteq!( runner.getvalue("slogan"), Some(&json!("The Free Encyclopedia")), );

runner.close().await.unwrap(); ```

A .side file for the example can be found in example directory.

Backends

siderunner supports 2 backends:

You can tweak fantoccini backend by providing a feature fantoccini_backend and turn off default features, default-features = false

Supported commands

[Selenium IDE] supports the following commands.

Development

Unit tests

cargo test --lib

Integrational tests

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

Requirements

Contributing

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.