marionette: Add support for WebDriver:Refresh
The `WebDriver:Refresh` command reloads the current page.
This commit is contained in:
@@ -155,4 +155,6 @@ pub enum Command {
|
||||
FullscreenWindow,
|
||||
#[serde(rename = "WebDriver:SetWindowRect")]
|
||||
SetWindowRect(WindowRect),
|
||||
#[serde(rename = "WebDriver:Refresh")]
|
||||
Refresh,
|
||||
}
|
||||
|
||||
@@ -271,6 +271,13 @@ impl Marionette {
|
||||
Ok(res.handle)
|
||||
}
|
||||
|
||||
pub async fn refresh(&mut self) -> Result<(), CommandError> {
|
||||
let res: serde_json::Value =
|
||||
self.conn.send_message(Command::Refresh).await?.unwrap();
|
||||
debug!("Reeived message: {:?}", res);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn set_window_rect(
|
||||
&mut self,
|
||||
x: Option<i32>,
|
||||
|
||||
Reference in New Issue
Block a user