mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1070268: Add findChildElements endpoint to Marionette for WebDriver compatibility; r=jgriffin
This commit is contained in:
parent
402eaa8531
commit
13a2a41ee2
@ -1621,6 +1621,26 @@ MarionetteServerConnection.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Find element using the indicated search strategy
|
||||
* starting from a known element. Used for WebDriver Compatibility only.
|
||||
* @param {object} aRequest
|
||||
* 'using' member indicates which search method to use
|
||||
* 'value' member is the value the client is looking for
|
||||
* 'id' member is the value of the element to start from
|
||||
*/
|
||||
findChildElement: function MDA_findChildElement(aRequest) {
|
||||
let command_id = this.command_id = this.getCommandId();
|
||||
this.sendAsync("findElementContent",
|
||||
{
|
||||
value: aRequest.parameters.value,
|
||||
using: aRequest.parameters.using,
|
||||
element: aRequest.parameters.id,
|
||||
searchTimeout: this.searchTimeout
|
||||
},
|
||||
command_id);
|
||||
},
|
||||
|
||||
/**
|
||||
* Find elements using the indicated search strategy.
|
||||
*
|
||||
@ -1660,6 +1680,26 @@ MarionetteServerConnection.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Find elements using the indicated search strategy
|
||||
* starting from a known element. Used for WebDriver Compatibility only.
|
||||
* @param {object} aRequest
|
||||
* 'using' member indicates which search method to use
|
||||
* 'value' member is the value the client is looking for
|
||||
* 'id' member is the value of the element to start from
|
||||
*/
|
||||
findChildElements: function MDA_findChildElement(aRequest) {
|
||||
let command_id = this.command_id = this.getCommandId();
|
||||
this.sendAsync("findElementsContent",
|
||||
{
|
||||
value: aRequest.parameters.value,
|
||||
using: aRequest.parameters.using,
|
||||
element: aRequest.parameters.id,
|
||||
searchTimeout: this.searchTimeout
|
||||
},
|
||||
command_id);
|
||||
},
|
||||
|
||||
/**
|
||||
* Return the active element on the page
|
||||
*/
|
||||
@ -2615,7 +2655,9 @@ MarionetteServerConnection.prototype.requestTypes = {
|
||||
"executeJSScript": MarionetteServerConnection.prototype.executeJSScript,
|
||||
"setSearchTimeout": MarionetteServerConnection.prototype.setSearchTimeout,
|
||||
"findElement": MarionetteServerConnection.prototype.findElement,
|
||||
"findChildElement": MarionetteServerConnection.prototype.findChildElements, // Needed for WebDriver compat
|
||||
"findElements": MarionetteServerConnection.prototype.findElements,
|
||||
"findChildElements":MarionetteServerConnection.prototype.findChildElements, // Needed for WebDriver compat
|
||||
"clickElement": MarionetteServerConnection.prototype.clickElement,
|
||||
"getElementAttribute": MarionetteServerConnection.prototype.getElementAttribute,
|
||||
"getElementText": MarionetteServerConnection.prototype.getElementText,
|
||||
|
Loading…
Reference in New Issue
Block a user