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 0.2.22 to 0.2.23

160

doc/release-notes.md

@@ -5,49 +5,65 @@ # Release Notes

### 0.2.0
### 0.2.22
- packages upgrade
- http proxy options
- configurable default chaining scope
- New wrapper: promise chain.
- Old chain api is deprecated (It is still available, but you will see a depreciation message).
- There are some changes in the way the element and webdriver classes are passed around
which may affect external wrappers. External wrappers should now subclass those 2 classes.
### 0.2.21
- better sauce job update logic
### 0.2.1
### 0.2.20
- configurable sauce rest root
- New test suite using the promise chain api.
- `browser.Q` was moved to `wd.Q`.
### 0.2.19
- packages upgrade
### 0.2.2
### 0.2.18
- bugfixes: getAppString + element unique arguments
- extra Appium method
- chai-as-promised v4 compatible.
- Promise wrappers can now be monkey patched directly.
- New saucelabs helpers.
### 0.2.17
- bugfix: TouchAction.moveTo
- stricter jshint
Incompatibilities:
### 0.2.16
- more mjson/appium methods
- command argument bugfix
- There is a new method to call, `wd.rewrap()`, to propagate async monkey patching to promise.
(see [here](https://github.com/admc/wd/blob/master/examples/promise/monkey.patch-with-async.js#L35)
and the monkey patch section in README) [Note: monkey patching and `rewrap` note recommended from 0.2.3].
- The chai-as-promised setup has changed in v4, look out for the `transferPromiseness` (Requires chai-as-promised 4.1.0 or greater)
line in the examples. (see [here](https://github.com/admc/wd/blob/master/examples/promise/chrome.js#L15)).
### 0.2.15
- extra mobile/appium method
- command arguments bugfix
### 0.2.3
### 0.2.14
- no defaults for appium
- better mobile examples
- Http configuration enhancements + base url, see doc [here](https://github.com/admc/wd#http-configuration--base-url).
- `waitFor`, `waitForElement` and asserters replacing existing wait methods.
- `addPromiseChainMethod`/`addPromiseMethod`/`addAsyncMethod`/`removeMethod` replacing monkey patching
(Please refer to the add method section in README).
- Support for external promise libraries.
- New saveScreenshot method.
### 0.2.13
- waitForElement fix
- added waitForElements method
- auth fix
- new context methods
### 0.2.4
### 0.2.12
- minor bugfix
- bugfix: android safeExecute.
- bugfix: passing argument to execute.
- bugfix: setOrientation.
- migrating from string.js to underscore.string.
### 0.2.11
- better logging
- better error handling
### 0.2.5
### 0.2.10
- packages upgrade to latest.
- Webdriver and Element refactoring
- Easier wd customization via `wd.setBaseClasses(Webdriver, Element)`
### 0.2.9
- http emit fix.
- added print method
- added at, nth, first, second, third, last to promise api
### 0.2.8
- added nodeify to transferPromiseness.
### 0.2.7
- `attach`/`detach` session.
- add `asyncRemote` and make `remote` generic.
### 0.2.6

@@ -62,56 +78,50 @@

### 0.2.7
- `attach`/`detach` session.
- add `asyncRemote` and make `remote` generic.
### 0.2.5
### 0.2.8
- added nodeify to transferPromiseness.
- Webdriver and Element refactoring
- Easier wd customization via `wd.setBaseClasses(Webdriver, Element)`
### 0.2.9
- http emit fix.
- added print method
- added at, nth, first, second, third, last to promise api
### 0.2.4
### 0.2.10
- packages upgrade to latest.
- bugfix: android safeExecute.
- bugfix: passing argument to execute.
- bugfix: setOrientation.
- migrating from string.js to underscore.string.
### 0.2.11
- better logging
- better error handling
### 0.2.3
### 0.2.12
- minor bugfix
- Http configuration enhancements + base url, see doc [here](https://github.com/admc/wd#http-configuration--base-url).
- `waitFor`, `waitForElement` and asserters replacing existing wait methods.
- `addPromiseChainMethod`/`addPromiseMethod`/`addAsyncMethod`/`removeMethod` replacing monkey patching
(Please refer to the add method section in README).
- Support for external promise libraries.
- New saveScreenshot method.
### 0.2.13
- waitForElement fix
- added waitForElements method
- auth fix
- new context methods
### 0.2.2
### 0.2.14
- no defaults for appium
- better mobile examples
- chai-as-promised v4 compatible.
- Promise wrappers can now be monkey patched directly.
- New saucelabs helpers.
### 0.2.15
- extra mobile/appium method
- command arguments bugfix
Incompatibilities:
### 0.2.16
- more mjson/appium methods
- command argument bugfix
- There is a new method to call, `wd.rewrap()`, to propagate async monkey patching to promise.
(see [here](https://github.com/admc/wd/blob/master/examples/promise/monkey.patch-with-async.js#L35)
and the monkey patch section in README) [Note: monkey patching and `rewrap` note recommended from 0.2.3].
- The chai-as-promised setup has changed in v4, look out for the `transferPromiseness` (Requires chai-as-promised 4.1.0 or greater)
line in the examples. (see [here](https://github.com/admc/wd/blob/master/examples/promise/chrome.js#L15)).
### 0.2.17
- bugfix: TouchAction.moveTo
- stricter jshint
### 0.2.1
### 0.2.18
- bugfixes: getAppString + element unique arguments
- extra Appium method
### 0.2.19
- packages upgrade
### 0.2.20
- configurable sauce rest root
### 0.2.21
- better sauce job update logic
- New test suite using the promise chain api.
- `browser.Q` was moved to `wd.Q`.
### 0.2.0
- New wrapper: promise chain.
- Old chain api is deprecated (It is still available, but you will see a depreciation message).
- There are some changes in the way the element and webdriver classes are passed around
which may affect external wrappers. External wrappers should now subclass those 2 classes.
### TODO

@@ -118,0 +128,0 @@ - write tests for sauceJobUpdate/sauceJobStatus

var request = require('request'),
utils = require("./utils");
utils = require("./utils"),
urllib = require('url');

@@ -9,2 +10,14 @@ exports.buildInitUrl =function(baseUrl)

exports.emit =function(browser ,method, url, data)
{
if (typeof data === 'object') {
data = JSON.stringify(data);
}
if(typeof url === 'string') { url = urllib.parse(url); }
browser.emit('http', method,
url.path.replace(browser.sessionID, ':sessionID')
.replace(browser.configUrl.pathname, ''), data
);
};
exports.buildJsonCallUrl = function(baseUrl ,sessionID, relPath, absPath){

@@ -11,0 +24,0 @@ var path = ['session'];

@@ -94,6 +94,3 @@ var EventEmitter = require('events').EventEmitter,

_this.emit('http', httpOpts.method,
url.path.replace(this.sessionID, ':sessionID')
.replace(this.configUrl.pathname, ''), data
);
httpUtils.emit(this, httpOpts.method, url, data);

@@ -164,6 +161,3 @@ httpOpts.prepareToSend(url, data);

// logging
_this.emit('http', httpOpts.method,
url.path.replace(this.sessionID, ':sessionID')
.replace(this.configUrl.pathname, ''), opts.data ? JSON.stringify(opts.data) : ''
);
httpUtils.emit(this, httpOpts.method, url, opts.data);

@@ -206,4 +200,3 @@ // writting data

}
_this.emit('http', 'POST' , '/rest/v1/:user/jobs/:sessionID',
jsonData ? JSON.stringify(jsonData) : '');
httpUtils.emit(_this, 'POST', '/rest/v1/:user/jobs/:sessionID', jsonData);
done();

@@ -210,0 +203,0 @@ });

@@ -10,3 +10,3 @@ {

],
"version": "0.2.22",
"version": "0.2.23",
"author": "Adam Christian <adam.christian@gmail.com>",

@@ -51,3 +51,3 @@ "contributors": [

"dependencies": {
"archiver": "~0.9.1",
"archiver": "~0.10.0",
"async": "~0.9.0",

@@ -54,0 +54,0 @@ "lodash": "~2.4.1",

# WD.js
[![NPM version](http://img.shields.io/npm/v/wd.svg)](https://npmjs.org/package/wd) [![Downloads](http://img.shields.io/npm/dm/wd.svg)](https://npmjs.org/package/wd)
[![NPM version](http://img.shields.io/npm/v/wd.svg)](https://npmjs.org/package/wd)
[![Downloads](http://img.shields.io/npm/dm/wd.svg)](https://npmjs.org/package/wd)
[![Dependency Status](https://david-dm.org/admc/wd.svg)](https://david-dm.org/admc/wd)
[![devDependency Status](https://david-dm.org/admc/wd/dev-status.svg)](https://david-dm.org/admc/wd#info=devDependencies)
[![Build Status](https://secure.travis-ci.org/admc/wd.png?branch=master)](http://travis-ci.org/admc/wd)

@@ -4,0 +8,0 @@ [![Selenium Test Status](https://saucelabs.com/buildstatus/wdjs)](https://saucelabs.com/u/wdjs)

@@ -66,3 +66,3 @@ GLOBAL._ = require('../../lib/lodash');

if(env.SAUCE){
env.BASE_TIME_UNIT = _(process.env.BASE_TIME_UNIT || 3000).toNumber().value();
env.BASE_TIME_UNIT = _(process.env.BASE_TIME_UNIT || 4000).toNumber().value();
env.TIMEOUT = _(process.env.TIMEOUT || 600000).toNumber().value();

@@ -69,0 +69,0 @@

@@ -877,3 +877,32 @@ var nock = require('nock'),

it("setNetworkConnection", function(done) {
nock.cleanAll();
server
.post('/session/1234/network_connection', {type: 5})
.reply(200, {
status: 0,
sessionId: '1234',
value: "OK" //TODO: not sure what the response looks like
});
browser
.setNetworkConnection(5)
.should.eventually.equal("OK")
.nodeify(done);
});
it("getNetworkConnection", function(done) {
nock.cleanAll();
server
.get('/session/1234/network_connection')
.reply(200, {
status: 0,
sessionId: '1234',
value: {value: 5}
});
browser
.getNetworkConnection()
.should.eventually.deep.equal({value: 5})
.nodeify(done);
});
});

@@ -880,0 +909,0 @@ });

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