pub enum BrowserAction {
Navigate {
url: String,
},
Click {
selector: String,
},
Type {
selector: String,
text: String,
},
Screenshot {
full_page: bool,
},
GetContent {
selector: Option<String>,
},
GetHtml {
selector: Option<String>,
},
WaitForSelector {
selector: String,
timeout_ms: u64,
},
Evaluate {
javascript: String,
},
GoBack,
GoForward,
Reload,
Close,
}Expand description
An action the agent wants to perform in the browser — a scouting move.
Variants§
Navigate to a URL.
Click
Click an element matching the CSS selector.
Type
Type text into an element matching the CSS selector.
Screenshot
Take a screenshot (full page or viewport only).
GetContent
Get the text content of an element (or the whole page).
GetHtml
Get the HTML of an element (or the whole page).
WaitForSelector
Wait for an element matching the selector to appear.
Evaluate
Execute arbitrary JavaScript in the page context.
GoBack
Navigate back in history.
GoForward
Navigate forward in history.
Reload
Reload the current page.
Close
Close the browser session.
Trait Implementations§
Source§impl Clone for BrowserAction
impl Clone for BrowserAction
Source§fn clone(&self) -> BrowserAction
fn clone(&self) -> BrowserAction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BrowserAction
impl Debug for BrowserAction
Source§impl<'de> Deserialize<'de> for BrowserAction
impl<'de> Deserialize<'de> for BrowserAction
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BrowserAction
impl RefUnwindSafe for BrowserAction
impl Send for BrowserAction
impl Sync for BrowserAction
impl Unpin for BrowserAction
impl UnsafeUnpin for BrowserAction
impl UnwindSafe for BrowserAction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more