Bug 1451725 - Remove deprecated WebDriver Commands r=whimboo

MozReview-Commit-ID: 7PXrlwyiFvN

--HG--
extra : rebase_source : cfcc1d235ea3325bd7d15242c24c8cf8362d2647
This commit is contained in:
Venkatesh Pitta 2018-07-27 11:27:22 +10:00
parent d53d22346c
commit f7b3601012
5 changed files with 5 additions and 59 deletions

View File

@ -3645,60 +3645,6 @@ GeckoDriver.prototype.commands = {
"WebDriver:SwitchToShadowRoot": GeckoDriver.prototype.switchToShadowRoot,
"WebDriver:SwitchToWindow": GeckoDriver.prototype.switchToWindow,
"WebDriver:TakeScreenshot": GeckoDriver.prototype.takeScreenshot,
// deprecated WebDriver commands, remove in Firefox 63
"acceptDialog": GeckoDriver.prototype.acceptDialog,
"addCookie": GeckoDriver.prototype.addCookie,
"clearElement": GeckoDriver.prototype.clearElement,
"clickElement": GeckoDriver.prototype.clickElement,
"close": GeckoDriver.prototype.close,
"deleteAllCookies": GeckoDriver.prototype.deleteAllCookies,
"deleteCookie": GeckoDriver.prototype.deleteCookie,
"deleteSession": GeckoDriver.prototype.deleteSession,
"dismissDialog": GeckoDriver.prototype.dismissDialog,
"executeAsyncScript": GeckoDriver.prototype.executeAsyncScript,
"executeScript": GeckoDriver.prototype.executeScript,
"findElement": GeckoDriver.prototype.findElement,
"findElements": GeckoDriver.prototype.findElements,
"fullscreen": GeckoDriver.prototype.fullscreenWindow,
"getActiveElement": GeckoDriver.prototype.getActiveElement,
"getActiveFrame": GeckoDriver.prototype.getActiveFrame,
"getCookies": GeckoDriver.prototype.getCookies,
"getCurrentUrl": GeckoDriver.prototype.getCurrentUrl,
"getElementAttribute": GeckoDriver.prototype.getElementAttribute,
"getElementProperty": GeckoDriver.prototype.getElementProperty,
"getElementRect": GeckoDriver.prototype.getElementRect,
"getElementTagName": GeckoDriver.prototype.getElementTagName,
"getElementText": GeckoDriver.prototype.getElementText,
"getElementValueOfCssProperty": GeckoDriver.prototype.getElementValueOfCssProperty,
"get": GeckoDriver.prototype.get,
"getPageSource": GeckoDriver.prototype.getPageSource,
"getSessionCapabilities": GeckoDriver.prototype.getSessionCapabilities,
"getTextFromDialog": GeckoDriver.prototype.getTextFromDialog,
"getTimeouts": GeckoDriver.prototype.getTimeouts,
"getTitle": GeckoDriver.prototype.getTitle,
"getWindowHandle": GeckoDriver.prototype.getWindowHandle,
"getWindowHandles": GeckoDriver.prototype.getWindowHandles,
"getWindowRect": GeckoDriver.prototype.getWindowRect,
"goBack": GeckoDriver.prototype.goBack,
"goForward": GeckoDriver.prototype.goForward,
"isElementDisplayed": GeckoDriver.prototype.isElementDisplayed,
"isElementEnabled": GeckoDriver.prototype.isElementEnabled,
"isElementSelected": GeckoDriver.prototype.isElementSelected,
"maximizeWindow": GeckoDriver.prototype.maximizeWindow,
"newSession": GeckoDriver.prototype.newSession,
"performActions": GeckoDriver.prototype.performActions,
"refresh": GeckoDriver.prototype.refresh,
"releaseActions": GeckoDriver.prototype.releaseActions,
"sendKeysToDialog": GeckoDriver.prototype.sendKeysToDialog,
"sendKeysToElement": GeckoDriver.prototype.sendKeysToElement,
"setTimeouts": GeckoDriver.prototype.setTimeouts,
"setWindowRect": GeckoDriver.prototype.setWindowRect,
"switchToFrame": GeckoDriver.prototype.switchToFrame,
"switchToParentFrame": GeckoDriver.prototype.switchToParentFrame,
"switchToShadowRoot": GeckoDriver.prototype.switchToShadowRoot,
"switchToWindow": GeckoDriver.prototype.switchToWindow,
"takeScreenshot": GeckoDriver.prototype.takeScreenshot,
};
function getOuterWindowId(win) {

View File

@ -154,7 +154,7 @@ class TestCapabilityMatching(MarionetteTestCase):
self.marionette.start_session(caps)
self.assertIn("timeouts", self.marionette.session_capabilities)
self.assertDictEqual(self.marionette.session_capabilities["timeouts"], timeouts)
self.assertDictEqual(self.marionette._send_message("getTimeouts"), timeouts)
self.assertDictEqual(self.marionette._send_message("WebDriver:GetTimeouts"), timeouts)
def test_unhandled_prompt_behavior(self):
behaviors = [

View File

@ -256,7 +256,7 @@ class TestExecuteContent(MarionetteTestCase):
def test_lasting_side_effects(self):
def send(script):
return self.marionette._send_message(
"executeScript", {"script": script}, key="value")
"WebDriver:ExecuteScript", {"script": script}, key="value")
send("window.foo = 1")
foo = send("return window.foo")
@ -351,7 +351,7 @@ class TestExecuteContent(MarionetteTestCase):
@skip_if_mobile("Modal dialogs not supported in Fennec")
def test_return_value_on_alert(self):
res = self.marionette._send_message("executeScript", {"script": "alert()"})
res = self.marionette._send_message("WebDriver:ExecuteScript", {"script": "alert()"})
self.assertIn("value", res)
self.assertIsNone(res["value"])

View File

@ -35,7 +35,7 @@ class Actions(object):
"type": "pointer"
}]}
return self.marionette._send_message("performActions", params=params)
return self.marionette._send_message("WebDriver:PerformActions", params=params)
def move(self, element, x=0, y=0, duration=250):
self.action_chain.append({

View File

@ -44,7 +44,7 @@ class TestSession(MarionetteTestCase):
self.marionette.start_session()
self.assertTrue(isinstance(self.marionette.session_id, unicode))
with self.assertRaises(errors.SessionNotCreatedException):
self.marionette._send_message("newSession", {})
self.marionette._send_message("WebDriver:NewSession", {})
def test_no_session(self):
with self.assertRaisesRegexp(errors.MarionetteException, "Please start a session"):