Skip to main content

codetether_agent/browser/request/
dom.rs

1use serde::Serialize;
2
3#[derive(Debug, Clone, Serialize)]
4pub struct SelectorRequest {
5    pub selector: String,
6    pub frame_selector: Option<String>,
7}
8
9#[derive(Debug, Clone, Serialize)]
10pub struct FillRequest {
11    pub selector: String,
12    pub value: String,
13    pub frame_selector: Option<String>,
14}
15
16#[derive(Debug, Clone, Serialize)]
17pub struct TypeRequest {
18    pub selector: String,
19    pub text: String,
20    pub delay_ms: u64,
21    pub frame_selector: Option<String>,
22}
23
24#[derive(Debug, Clone, Serialize)]
25pub struct KeyPressRequest {
26    pub selector: String,
27    pub key: String,
28    pub frame_selector: Option<String>,
29}
30
31#[derive(Debug, Clone, Serialize)]
32pub struct ScopeRequest {
33    pub selector: Option<String>,
34    pub frame_selector: Option<String>,
35}
36
37#[derive(Debug, Clone, Serialize)]
38pub struct ClickTextRequest {
39    pub selector: Option<String>,
40    pub frame_selector: Option<String>,
41    pub text: String,
42    pub timeout_ms: u64,
43    pub exact: bool,
44    pub index: usize,
45}
46
47#[derive(Debug, Clone, Serialize)]
48pub struct ToggleRequest {
49    pub selector: String,
50    pub frame_selector: Option<String>,
51    pub text: String,
52    pub timeout_ms: u64,
53}