Skip to content

Commit

Permalink
geckodriver: Merge pull request #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

--HG--
extra : rebase_source : a3237e8c0d5d5c82360a2835da31a7ac59fa0592
  • Loading branch information
AutomatedTester committed Feb 26, 2015
1 parent c869315 commit 4a63430
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 4a63430

Please sign in to comment.