pub mod emitter;
pub mod recorder;
#[derive(Debug, Clone, serde::Deserialize)]
#[serde(tag = "type", rename_all = "camelCase")]
pub enum Action {
Navigate {
url: String,
},
Click {
selector: String,
locator: String,
},
Dblclick {
selector: String,
locator: String,
},
Fill {
selector: String,
locator: String,
value: String,
},
Press {
selector: String,
locator: String,
key: String,
},
Select {
selector: String,
locator: String,
value: String,
},
Check {
selector: String,
locator: String,
},
Uncheck {
selector: String,
locator: String,
},
}
#[derive(Debug, Clone, Copy, Default)]
pub enum OutputLanguage {
#[default]
Rust,
TypeScript,
Gherkin,
}
impl OutputLanguage {
#[must_use]
pub fn parse_cli(s: &str) -> Self {
match s {
"typescript" | "ts" => Self::TypeScript,
"gherkin" | "feature" | "bdd" => Self::Gherkin,
_ => Self::Rust,
}
}
}