tauri_plugin_wdio/models.rs
1pub use serde_json::Value as JsonValue;
2
3/// Execute command request
4#[derive(serde::Deserialize, Debug)]
5pub struct ExecuteRequest {
6 /// JavaScript code to execute
7 pub script: String,
8 /// Arguments to pass to the script
9 #[serde(default)]
10 pub args: Vec<JsonValue>,
11 /// Window label to execute in (optional, uses current window if not specified)
12 #[serde(default)]
13 pub window_label: Option<String>,
14}
15
16/// Mock configuration
17#[derive(serde::Deserialize, serde::Serialize, Debug, Clone)]
18pub struct MockConfig {
19 /// Command name to mock
20 pub command: String,
21 /// Mock return value (for mockReturnValue)
22 pub return_value: Option<JsonValue>,
23 /// Mock implementation (for mockImplementation - serialized function string)
24 pub implementation: Option<String>,
25}