Comparing version 1.0.0 to 1.1.1
@@ -129,3 +129,4 @@ { | ||
"POST /session/:sessionId/appium/device/hide_keyboard": "Hide keyboard (mjsonWire).", | ||
"POST /session/:sessionId/appium/device/open_notifications": "Open Notifications (mjsonWire)." | ||
"POST /session/:sessionId/appium/device/open_notifications": "Open Notifications (mjsonWire).", | ||
"POST /session/:sessionId/simulator/touch_id": "Simulate iOS touchID (mjsonWire)" | ||
} |
# Release Notes | ||
## 1.1.x Release | ||
### 1.1.1 | ||
- added followAllRedirects option to all http requests | ||
- added touch_id method | ||
- case insensitive setOrientation | ||
- use Array.isArray() internally | ||
note: 1.1.0 was skipped | ||
## 1.0.x Release | ||
### 1.0.0 | ||
- upgraded all dependencies | ||
- code fixes for new dependencies | ||
- NodeJS v6 targeted version, tested against v5 in CI | ||
## 0.4.x Release | ||
### 0.4.0 | ||
- touch action | ||
## 0.3.x Release | ||
@@ -4,0 +26,0 @@ |
@@ -133,3 +133,3 @@ var utils = require("./utils"), | ||
{message:obj.value.message,cause:obj.value}));} | ||
if (!(obj.value instanceof Array)) {return cb(newError( | ||
if (!Array.isArray(obj.value)) {return cb(newError( | ||
{message:"Response value field is not an Array.", cause:obj.value}));} | ||
@@ -156,3 +156,3 @@ var i, elements = []; | ||
cb(null, el); | ||
} else if (obj.value instanceof Array){ | ||
} else if (Array.isArray(obj.value)){ | ||
var i, elements = []; | ||
@@ -159,0 +159,0 @@ for (i = 0; i < obj.value.length; i++) { |
@@ -49,3 +49,3 @@ //Element object | ||
var _this = this; | ||
if (!(keys instanceof Array)) {keys = [keys];} | ||
if (!Array.isArray(keys)) {keys = [keys];} | ||
@@ -80,3 +80,3 @@ // ensure all keystrokes are strings to conform to JSONWP | ||
var _this = this; | ||
if (!(keys instanceof Array)) {keys = [keys];} | ||
if (!Array.isArray(keys)) {keys = [keys];} | ||
@@ -83,0 +83,0 @@ // ensure all keystrokes are strings to conform to JSONWP |
@@ -49,2 +49,3 @@ var request = require('request'), | ||
if(opts.method === 'GET' || opts.method === 'POST'){ | ||
opts.followAllRedirects = true; | ||
opts.headers.Accept = 'application/json'; | ||
@@ -51,0 +52,0 @@ } |
@@ -11,3 +11,3 @@ { | ||
], | ||
"version": "1.0.0", | ||
"version": "1.1.1", | ||
"author": "Adam Christian <adam.christian@gmail.com>", | ||
@@ -14,0 +14,0 @@ "contributors": [ |
@@ -17,3 +17,3 @@ # WD.js | ||
This library is designed to be a maleable implementation of the webdriver protocol in Node, exposing functionality via a number of programming paradigms. If you are looking for a more polished, opinionated and active library - I would suggest [webdriver.io](http://webdriver.io/). | ||
This library is designed to be a maleable implementation of the webdriver protocol in Node, exposing functionality via a number of programming paradigms. If you are looking for a more opinionated library, you might find [webdriver.io](http://webdriver.io/) interesting. | ||
@@ -20,0 +20,0 @@ ## Release Notes |
@@ -13,2 +13,6 @@ var nock = require('nock'); | ||
'Location': '/wd/hub/session/1234' | ||
}).get('/wd/hub/session/1234').reply(200, { | ||
status: 0, | ||
sessionId: '1234', | ||
value: {} | ||
}); | ||
@@ -66,3 +70,8 @@ | ||
'Location': '/wd/hub/session/1234' | ||
}).get('/wd/hub/session/1234').reply(200, { | ||
status: 0, | ||
sessionId: '1234', | ||
value: {} | ||
}); | ||
browser = wd.promiseChainRemote({ | ||
@@ -69,0 +78,0 @@ port: 5555 |
@@ -16,3 +16,8 @@ var nock = require('nock'); | ||
'Location': '/session/1234' | ||
}).get('/session/1234').reply(200, { | ||
status: 0, | ||
sessionId: '1234', | ||
value: {} | ||
}); | ||
browser = wd.remote('http://localhost:9515/'); | ||
@@ -55,2 +60,3 @@ browser.init({}, function(err) { | ||
.reply(303, "OK", { 'Location': '/session/1234' }); | ||
browser = wd.remote('http://localhost:4444'); | ||
@@ -57,0 +63,0 @@ var desired = {}; |
@@ -19,3 +19,8 @@ var nock = require('nock'), | ||
'Location': '/session/1234' | ||
}).get('/session/1234').reply(200, { | ||
status: 0, | ||
sessionId: '1234', | ||
value: {} | ||
}); | ||
browser = wd.promiseChainRemote('http://localhost:5555/'); | ||
@@ -391,2 +396,16 @@ browser | ||
it("touchId", function(done){ | ||
nock.cleanAll(); | ||
server | ||
.post('/session/1234/appium/simulator/touch_id', {match: true}) | ||
.times(1) | ||
.reply(200, { | ||
sessionId: '1234', | ||
}); | ||
browser | ||
.touchId(true) | ||
.nodeify(done); | ||
}); | ||
it("lockDevice", function(done) { | ||
@@ -1011,2 +1030,6 @@ nock.cleanAll(); | ||
'Location': '/session/1234' | ||
}).get('/session/1234').reply(200, { | ||
status: 0, | ||
sessionId: '1234', | ||
value: {} | ||
}); | ||
@@ -1013,0 +1036,0 @@ browser = wd.remote('http://localhost:5555/'); |
Sorry, the diff of this file is not supported yet
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
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
721803
13838