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
This commit is contained in:
Andreas Tolfsen 2015-09-17 14:05:51 +01:00
parent 8d21324707
commit 13717f6ebd

View File

@ -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. * 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. */ /** Return the active element on the page. */
GeckoDriver.prototype.getActiveElement = function(cmd, resp) { GeckoDriver.prototype.getActiveElement = function(cmd, resp) {
resp.body.value = yield this.listener.getActiveElement(); resp.body.value = yield this.listener.getActiveElement();
@ -2958,9 +2920,7 @@ GeckoDriver.prototype.commands = {
"executeJSScript": GeckoDriver.prototype.executeJSScript, "executeJSScript": GeckoDriver.prototype.executeJSScript,
"setSearchTimeout": GeckoDriver.prototype.setSearchTimeout, "setSearchTimeout": GeckoDriver.prototype.setSearchTimeout,
"findElement": GeckoDriver.prototype.findElement, "findElement": GeckoDriver.prototype.findElement,
"findChildElement": GeckoDriver.prototype.findChildElements, // Needed for WebDriver compat
"findElements": GeckoDriver.prototype.findElements, "findElements": GeckoDriver.prototype.findElements,
"findChildElements":GeckoDriver.prototype.findChildElements, // Needed for WebDriver compat
"clickElement": GeckoDriver.prototype.clickElement, "clickElement": GeckoDriver.prototype.clickElement,
"getElementAttribute": GeckoDriver.prototype.getElementAttribute, "getElementAttribute": GeckoDriver.prototype.getElementAttribute,
"getElementText": GeckoDriver.prototype.getElementText, "getElementText": GeckoDriver.prototype.getElementText,