From 13717f6ebd08d5a556a27241ed30014174e65107 Mon Sep 17 00:00:00 2001 From: Andreas Tolfsen Date: Thu, 17 Sep 2015 14:05:51 +0100 Subject: [PATCH] Bug 1205638: Remove findChildElement and findChildElements commands The findChildElement and findChildElements commands were originally added to provide Selenium compatibility because it sends an "id" field in the body. They are both unneeded now that we have wires which extracts the element ID from the URI template and sets the "element" field that the normal findElement and findElements commands use. r=dburns --- testing/marionette/driver.js | 40 ------------------------------------ 1 file changed, 40 deletions(-) diff --git a/testing/marionette/driver.js b/testing/marionette/driver.js index 4d61b4f8da4..8cee66e7875 100644 --- a/testing/marionette/driver.js +++ b/testing/marionette/driver.js @@ -1900,25 +1900,6 @@ GeckoDriver.prototype.findElement = function(cmd, resp) { } }; -/** - * Find element using the indicated search strategy starting from a - * known element. Used for WebDriver Compatibility only. - * - * @param {string} using - * Indicates which search method to use. - * @param {string} value - * Value the client is looking for. - * @param {string} id - * Value of the element to start from. - */ -GeckoDriver.prototype.findChildElement = function(cmd, resp) { - resp.body.value = yield this.listener.findElementContent({ - value: cmd.parameters.value, - using: cmd.parameters.using, - element: cmd.parameters.id, - searchTimeout: this.searchTimeout}); -}; - /** * Find elements using the indicated search strategy. * @@ -1952,25 +1933,6 @@ GeckoDriver.prototype.findElements = function(cmd, resp) { } }; -/** - * Find elements using the indicated search strategy starting from a - * known element. Used for WebDriver Compatibility only. - * - * @param {string} using - * Indicates which search method to use. - * @param {string} value - * Value the client is looking for. - * @param {string} id - * Value of the element to start from. - */ -GeckoDriver.prototype.findChildElements = function(cmd, resp) { - resp.body.value = yield this.listener.findElementsContent({ - value: cmd.parameters.value, - using: cmd.parameters.using, - element: cmd.parameters.id, - searchTimeout: this.searchTimeout}); -}; - /** Return the active element on the page. */ GeckoDriver.prototype.getActiveElement = function(cmd, resp) { resp.body.value = yield this.listener.getActiveElement(); @@ -2958,9 +2920,7 @@ GeckoDriver.prototype.commands = { "executeJSScript": GeckoDriver.prototype.executeJSScript, "setSearchTimeout": GeckoDriver.prototype.setSearchTimeout, "findElement": GeckoDriver.prototype.findElement, - "findChildElement": GeckoDriver.prototype.findChildElements, // Needed for WebDriver compat "findElements": GeckoDriver.prototype.findElements, - "findChildElements":GeckoDriver.prototype.findChildElements, // Needed for WebDriver compat "clickElement": GeckoDriver.prototype.clickElement, "getElementAttribute": GeckoDriver.prototype.getElementAttribute, "getElementText": GeckoDriver.prototype.getElementText,