Skip to content

Commit

Permalink
geckodriver: Merge pull request mozilla#3 from AutomatedTester/modals
Browse files Browse the repository at this point in the history
Add in endpoints for modal dialog support

Source-Repo: https://github.com/mozilla/geckodriver
Source-Revision: 83b4de3af8ac59ae394d74f64280b3b69d8a3594
  • Loading branch information
AutomatedTester committed Feb 26, 2015
1 parent 3cb3c00 commit d1ba67e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions testing/geckodriver/src/marionette.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,10 +637,14 @@ impl ToMarionette for WebDriverMessage {
ExecuteAsyncScript(ref x) => (Some("executeAsyncScript"), Some(x.to_marionette())),
GetCookie(ref x) => (Some("getCookies"), Some(x.to_marionette())),
AddCookie(ref x) => (Some("addCookie"), Some(x.to_marionette())),
DismissAlert => (None, None), //Unsupported
AcceptAlert => (None, None), //Unsupported
GetAlertText => (None, None), //Unsupported
SendAlertText(_) => (None, None), //Unsupported
DismissAlert => (Some("dismissDialog"), None),
AcceptAlert => (Some("acceptDialog"), None),
GetAlertText => (Some("getTextFromDialog"), None),
SendAlertText(ref x) => {
let mut data = BTreeMap::new();
data.insert("value".to_string(), x.to_json());
(Some("sendKeysToDialog"), Some(Ok(Json::Object(data))))
},
TakeScreenshot(ref x) => (Some("takeScreenshot"), Some(x.to_marionette())),
};

Expand Down

0 comments on commit d1ba67e

Please sign in to comment.