Permalink
Browse files

Fix pointerMove and pointerCancel action types

  • Loading branch information...
jgraham committed Feb 9, 2017
1 parent 29ed83f commit 59949424149700b0785bf33eb0d019ecd8279461
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/command.rs
View
@@ -1489,8 +1489,8 @@ impl Parameters for PointerAction {
match body.find("type").and_then(|x| x.as_string()) {
Some("pointerUp") => Ok(PointerAction::Up(try!(PointerUpAction::from_json(body)))),
Some("pointerDown") => Ok(PointerAction::Down(try!(PointerDownAction::from_json(body)))),
Some("move") => Ok(PointerAction::Move(try!(PointerMoveAction::from_json(body)))),
Some("cancel") => Ok(PointerAction::Cancel),
Some("pointerMove") => Ok(PointerAction::Move(try!(PointerMoveAction::from_json(body)))),
Some("pointerCancel") => Ok(PointerAction::Cancel),
Some(_) | None => Err(WebDriverError::new(
ErrorStatus::InvalidArgument,
"Missing or invalid type argument for pointer action"))
@@ -1507,7 +1507,7 @@ impl ToJson for PointerAction {
&PointerAction::Cancel => {
let mut data = BTreeMap::new();
data.insert("type".to_owned(),
"cancel".to_json());
"pointerCancel".to_json());
Json::Object(data)
}
}

0 comments on commit 5994942

Please sign in to comment.