marionette-client
Advanced tools
Comparing version 0.13.1 to 0.13.2
@@ -80,3 +80,7 @@ /** | ||
findElement: function findElement(query, method, callback) { | ||
this.client.findElement(query, method, this.id, callback); | ||
var result = this.client.findElement(query, method, this.id, callback); | ||
if (this.client.isSync) { | ||
return result; | ||
} | ||
return this; | ||
@@ -95,3 +99,6 @@ }, | ||
findElements: function findElement(query, method, callback) { | ||
this.client.findElements(query, method, this.id, callback); | ||
var result = this.client.findElements(query, method, this.id, callback); | ||
if (this.client.isSync) { | ||
return result; | ||
} | ||
return this; | ||
@@ -110,3 +117,3 @@ }, | ||
scriptWith: function scriptWith(script, callback) { | ||
this.client.executeScript(script, [this], callback); | ||
return this.client.executeScript(script, [this], callback); | ||
}, | ||
@@ -118,18 +125,11 @@ | ||
* @method equals | ||
* @param {String|Marionette.Element} element element to test. | ||
* @param {Function} callback called with boolean. | ||
* @return {Object} self. | ||
* @param {Marionette.Element} element element to test. | ||
* @return {Boolean} true when equal. | ||
*/ | ||
equals: function equals(element, callback) { | ||
if (element instanceof this.constructor) { | ||
element = element.id; | ||
equals: function equals(element) { | ||
if (!(element instanceof Element)) { | ||
throw new Error('must pass an element'); | ||
} | ||
var cmd = { | ||
type: 'elementsEqual', | ||
elements: [this.id, element] | ||
}; | ||
this.client._sendCommand(cmd, 'value', callback); | ||
return this; | ||
return this.id === element.id; | ||
}, | ||
@@ -136,0 +136,0 @@ |
{ | ||
"name": "marionette-client", | ||
"version": "0.13.1", | ||
"version": "0.13.2", | ||
"main": "lib/marionette/index", | ||
@@ -5,0 +5,0 @@ "description": "Marionette Javascript Client", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
85605