pub enum Commands {
Show 45 variants
ToggleClickOverlay {
enabled: bool,
},
ToggleBoundingBoxes {
enabled: bool,
selector: Option<String>,
limit: Option<usize>,
include_html: Option<bool>,
},
NavigateTo {
url: String,
},
Refresh,
WaitForNavigation {
timeout_ms: Option<u64>,
},
WaitForElement {
selector: String,
timeout_ms: Option<u64>,
visible_only: Option<bool>,
},
Click {
selector: String,
},
ClickAt {
x: f64,
y: f64,
},
Clear {
selector: String,
},
PressKey {
selector: String,
key: String,
},
GetContent {
selector: Option<String>,
kind: Option<PageContentKind>,
},
GetText {
selector: String,
},
GetAttribute {
selector: String,
attribute: String,
},
GetTitle,
ExtractStructuredContent {
query: String,
schema: Option<Value>,
max_chars: Option<usize>,
},
Evaluate {
expression: String,
},
GetBoundingBoxes {
selector: String,
limit: Option<usize>,
include_html: Option<bool>,
},
InspectElement {
selector: String,
},
ScrollTo {
x: Option<f64>,
y: Option<f64>,
},
MoveMouseTo {
x: f64,
y: f64,
steps: Option<u32>,
},
Drag {
from: CommandPoint,
to: CommandPoint,
modifiers: Option<i64>,
},
ScrollIntoView {
selector: String,
},
Screenshot {
full_page: Option<bool>,
path: Option<String>,
},
ClickAdvanced {
selector: String,
button: Option<String>,
click_count: Option<u8>,
modifiers: Option<i64>,
},
TypeText {
selector: String,
text: String,
clear: Option<bool>,
},
Hover {
selector: String,
},
Focus {
selector: String,
},
Check {
selector: String,
},
SelectOption {
selector: String,
values: Vec<String>,
},
DragTo {
selector: String,
target_selector: Option<String>,
source_position: Option<CommandPoint>,
target_position: Option<CommandPoint>,
modifiers: Option<i64>,
},
EvaluateOnElement {
selector: String,
expression: String,
},
GetElementBoundingBox {
selector: String,
},
ElementScreenshot {
selector: String,
format: Option<String>,
quality: Option<u8>,
},
GetBasicInfo {
selector: String,
},
SetCookie {
name: String,
value: String,
domain: Option<String>,
path: Option<String>,
url: Option<String>,
secure: Option<bool>,
http_only: Option<bool>,
same_site: Option<String>,
expires: Option<f64>,
},
SetCookies {
cookies: String,
domain: String,
path: Option<String>,
secure: Option<bool>,
http_only: Option<bool>,
},
GetCookies,
DeleteCookie {
name: String,
domain: Option<String>,
},
GetLocalStorage,
SetLocalStorage {
items: Vec<LocalStorageItem>,
},
ClearLocalStorage,
GetSessionStorage,
SetSessionStorage {
items: Vec<LocalStorageItem>,
},
ClearSessionStorage,
CaptureState,
}Variants§
ToggleClickOverlay
ToggleBoundingBoxes
Refresh
WaitForElement
Click
ClickAt
Clear
PressKey
GetContent
GetText
GetAttribute
GetTitle
ExtractStructuredContent
Fields
Evaluate
GetBoundingBoxes
InspectElement
ScrollTo
Scroll to absolute coordinates. Both x and y are optional. If x is omitted, horizontal scroll position is unchanged. If y is omitted, vertical scroll position is unchanged.
MoveMouseTo
Move mouse to coordinates with optional human-like interpolation.
If steps is provided, the mouse will move through intermediate points
with small delays to simulate human movement.
Fields
Drag
ScrollIntoView
Screenshot
ClickAdvanced
TypeText
Hover
Focus
Check
SelectOption
DragTo
EvaluateOnElement
GetElementBoundingBox
ElementScreenshot
GetBasicInfo
SetCookie
Set a single cookie. For cookies with a domain, you may need to navigate to a matching URL first.
Fields
SetCookies
Set multiple cookies at once from a semicolon-separated string (e.g., “name1=value1; name2=value2”)
Fields
Semicolon-separated cookie string
GetCookies
Get all cookies for the current page
DeleteCookie
Delete a cookie by name
GetLocalStorage
Get all localStorage items for the current page
SetLocalStorage
Set localStorage items on the current page
Fields
items: Vec<LocalStorageItem>Key-value pairs to set
ClearLocalStorage
Clear all localStorage for the current page
GetSessionStorage
Get all sessionStorage items for the current page
SetSessionStorage
Set sessionStorage items on the current page
Fields
items: Vec<LocalStorageItem>Key-value pairs to set
ClearSessionStorage
Clear all sessionStorage for the current page
CaptureState
Capture complete browser state (cookies, localStorage, sessionStorage, current URL)
Implementations§
Source§impl Commands
impl Commands
pub fn command_type(&self) -> CommandType
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Commands
impl<'de> Deserialize<'de> for Commands
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<Commands> for BrowserToolOptions
impl From<Commands> for BrowserToolOptions
Source§impl JsonSchema for Commands
impl JsonSchema for Commands
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more