Comparing version 1.10.0 to 1.10.1
//ImageElement object | ||
//Wrapper around tap methods | ||
var __slice = Array.prototype.slice; | ||
var TouchAction = require('./actions').TouchAction; | ||
@@ -33,6 +32,17 @@ var ImageElement = function(rect, browser) { | ||
Object.defineProperty(ImageElement, 'TouchAction', { | ||
// only want to load the TouchAction class once, and only after all files | ||
// are loaded, so as to avoid circularity in the module loading | ||
get: function () { | ||
if (!this._touchAction) { | ||
this._touchAction = require('./actions').TouchAction; | ||
} | ||
return this._touchAction; | ||
} | ||
}); | ||
ImageElement.prototype.click = function (cb) { | ||
var _this = this; | ||
this.emit('command', "CALL" , "imageElement.click()") | ||
var action = new TouchAction(this.browser); | ||
var action = new this.TouchAction(this.browser); | ||
action.tap(this.x, this.y); | ||
@@ -39,0 +49,0 @@ action.perform(function(err) { |
@@ -11,3 +11,3 @@ { | ||
], | ||
"version": "1.10.0", | ||
"version": "1.10.1", | ||
"author": "Adam Christian <adam.christian@gmail.com>", | ||
@@ -14,0 +14,0 @@ "contributors": [ |
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
991708
14695