Comparing version 1.4.1 to 1.5.0
@@ -22,2 +22,15 @@ ### Mobile JsonWire Protocol Methods ### | ||
#### -ios class chain Locator Strategy #### | ||
Find elements in iOS applications using the [WebDriverAgent Class Chain API](https://github.com/facebook/WebDriverAgent/wiki/Class-Chain-Queries-Construction-Rules) | ||
eg: | ||
``` | ||
wd.elementsByIosClassChain('XCUIElementTypeWindow/XCUIElementTypeAny[`value == "bla1" OR label == "bla2"`]', function(err, el){ | ||
el.getAttribute('name', function(err, name){ | ||
console.log(name); | ||
}); | ||
}); | ||
``` | ||
#### -android uiautomator Locator Strategy #### | ||
@@ -24,0 +37,0 @@ |
@@ -11,3 +11,3 @@ //Element object | ||
commands = require('./commands'); | ||
var elementCommands = {}; | ||
@@ -310,2 +310,3 @@ | ||
* element.elementByIosUIAutomation(value, cb) -> cb(err, element) | ||
* element.elementByIosClassChain(value, cb) -> cb(err, element) | ||
* element.elementByAndroidUIAutomator(value, cb) -> cb(err, element) | ||
@@ -332,2 +333,3 @@ * element.elementByAccessibilityId(value, cb) -> cb(err, element) | ||
* element.elementsByIosUIAUtomation(value, cb) -> cb(err, elements) | ||
* element.elementsByIosClassChain(value, cb) -> cb(err, elements) | ||
* element.elementsByAndroidUIAutomator(value, cb) -> cb(err, elements) | ||
@@ -414,3 +416,3 @@ * element.elementsByAccessibilityId(value, cb) -> cb(err, elements) | ||
* {x: 114, y: 198, duration: 5, radius: 3, rotation: 220, touchCount: 2} | ||
* | ||
* | ||
* @jsonWire POST /session/:sessionId/appium/device/rotate | ||
@@ -417,0 +419,0 @@ */ |
@@ -23,3 +23,4 @@ var Args = require("vargs").Constructor, | ||
'-ios uiautomation': 'ByIosUIAutomation', | ||
'-android uiautomator': 'ByAndroidUIAutomator' | ||
'-android uiautomator': 'ByAndroidUIAutomator', | ||
'-ios class chain': 'ByIosClassChain' | ||
}; | ||
@@ -43,4 +44,6 @@ exports.elFuncSuffix = function(type){ | ||
// from JsonWire spec + shortcuts + mobile JsonWire spec | ||
exports.elementFuncTypes = ['class name', 'css selector','id','name','link text', | ||
'partial link text','tag name', 'xpath', 'css', '-ios uiautomation', '-android uiautomator', 'accessibility id']; | ||
exports.elementFuncTypes = ['class name', 'css selector','id','name', | ||
'link text', 'partial link text','tag name', 'xpath', 'css', | ||
'-ios uiautomation', '-android uiautomator', 'accessibility id', | ||
'-ios class chain']; | ||
@@ -93,5 +96,5 @@ // chai-as-promised promisifier | ||
// Android doesn't like cariage return | ||
exports.inlineJs = function(script) { | ||
return script.replace(/[\r\n]/g,'').trim(); | ||
// Android doesn't like cariage return | ||
exports.inlineJs = function(script) { | ||
return script.replace(/[\r\n]/g,'').trim(); | ||
}; | ||
@@ -98,0 +101,0 @@ |
@@ -134,3 +134,3 @@ var EventEmitter = require('events').EventEmitter, | ||
if (cb) { | ||
err = new Error('The environment you requested was unavailable.'); | ||
err = new Error('The environment you requested was unavailable.' + jsonData.value ? ('\n' + jsonData.value.message) : ''); | ||
err.data = data; | ||
@@ -137,0 +137,0 @@ return cb(err); |
@@ -11,3 +11,3 @@ { | ||
], | ||
"version": "1.4.1", | ||
"version": "1.5.0", | ||
"author": "Adam Christian <adam.christian@gmail.com>", | ||
@@ -14,0 +14,0 @@ "contributors": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 21 instances 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
968681
137
14171
94
4