Socket
Socket
Sign inDemoInstall

wd

Package Overview
Dependencies
Maintainers
4
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wd - npm Package Compare versions

Comparing version 1.4.1 to 1.5.0

lib/.commands.js.un~

13

doc/jsonwire-mobile.md

@@ -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 @@

6

lib/element-commands.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc