Socket
Socket
Sign inDemoInstall

wd

Package Overview
Dependencies
Maintainers
1
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.0.30 to 0.0.31

41

lib/webdriver.js

@@ -1222,3 +1222,3 @@ var EventEmitter = require('events').EventEmitter;

/**
* flick(xSpeed, ySpeed, cb) -> cb(err)
* flick(xSpeed, ySpeed, swipe, cb) -> cb(err)
* Flicks, starting anywhere on the screen.

@@ -1233,3 +1233,3 @@ *

var args = __slice.call(arguments, 0);
if (args.length <= 3) {
if (args.length <= 4) {
_flick1.apply(this, args);

@@ -1244,9 +1244,15 @@ } else {

var cb = fargs.callback,
xSpeed = fargs.all[0],
ySpeed = fargs.all[1];
xspeed = fargs.all[0],
yspeed = fargs.all[1],
swipe = fargs.all[2];
var data = { xspeed: xspeed, yspeed: yspeed };
if (swipe) {
data.swipe = swipe;
}
this._jsonWireCall({
method: 'POST'
, relPath: '/touch/flick'
, data: { xSpeed: xSpeed, ySpeed: ySpeed }
, data: data
, cb: this._simpleCallback(cb)

@@ -1362,2 +1368,8 @@ });

if (!(keys instanceof Array)) {keys = [keys];}
// ensure all keystrokes are strings to conform to JSONWP
_.each(keys, function(key, idx) {
if (typeof key !== "string") {
keys[idx] = key.toString();
}
});
this._jsonWireCall({

@@ -1394,2 +1406,8 @@ method: 'POST'

if (!(keys instanceof Array)) {keys = [keys];}
// ensure all keystrokes are strings to conform to JSONWP
_.each(keys, function(key, idx) {
if (typeof key !== "string") {
keys[idx] = key.toString();
}
});
this._jsonWireCall({

@@ -1695,2 +1713,15 @@ method: 'POST'

/**
* getPageIndex(element, cb) -> cb(err, pageIndex)
*
* @jsonWire GET /session/:sessionId/element/:id/pageIndex
*/
webdriver.prototype.getPageIndex = function(element, cb) {
this._jsonWireCall({
method: 'GET'
, relPath: '/element/' + element + '/pageIndex'
, cb: this._callbackWithData(cb)
});
};
/**
* getLocation(element, cb) -> cb(err, location)

@@ -1697,0 +1728,0 @@ *

2

package.json

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

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

@@ -13,0 +13,0 @@ "repository": {

@@ -18,10 +18,2 @@ var TIMEOUT, assert, should, test;

after(function(done) {
if(markAsPassed) {
markAsPassed(sessionID, done);
} else {
done(null);
}
});
describe("remote", function() {

@@ -87,2 +79,9 @@ it("should create browser", function(done) {

});
if(markAsPassed) {
describe("marking job as passed", function() {
it("should mark job ass passed", function(done) {
markAsPassed(sessionID, done);
});
});
}
};

@@ -89,0 +88,0 @@

@@ -256,5 +256,6 @@ /*global describe,before,it,after */

describe("element.sendKeys", function() {
var firstText = "keys";
it("should send keys", function(done) {
var text;
text = "keys";
text = firstText;
browser.element("id", "sendKeys", function(err, el) {

@@ -273,2 +274,19 @@ should.not.exist(err);

});
it("should send keys as strings", function(done) {
var text;
text = [100136872.21, {}];
browser.element("id", "sendKeys", function(err, el) {
should.not.exist(err);
el.should.have.property("sendKeys");
el.sendKeys(text, function(err) {
should.not.exist(err);
el.getValue(function(err, textReceived) {
should.not.exist(err);
textReceived.should.equal(firstText + text[0].toString() +
text[1].toString());
done(null);
});
});
});
});
});

@@ -275,0 +293,0 @@ describe("element.clear", function() {

@@ -18,11 +18,3 @@ /*global describe,before,it,after */

browser = null;
after(function(done) {
if(markAsPassed) {
markAsPassed(sessionID, done);
} else {
done(null);
}
});
describe("remote promises", function() {

@@ -87,2 +79,9 @@ describe("remote", function() {

});
if(markAsPassed) {
describe("marking job as passed", function() {
it("should mark job ass passed", function(done) {
markAsPassed(sessionID, done);
});
});
}
});

@@ -89,0 +88,0 @@ };

@@ -15,3 +15,4 @@ /*global describe,before,it,after */

browserName: 'chrome',
tags: ['wd', 'test']
tags: ['wd', 'test'],
"record-video": false
};

@@ -22,3 +23,4 @@

browserName: 'firefox',
tags: ['wd', 'test']
tags: ['wd', 'test'],
"record-video": false
};

@@ -31,3 +33,4 @@

platform: 'Windows 2008',
tags: ['wd', 'test']
tags: ['wd', 'test'],
"record-video": false
};

@@ -34,0 +37,0 @@

@@ -19,5 +19,2 @@ /*global describe,before,it,after */

var browser;
after(function(done) {
configHelper.jobPassed(browser.sessionID, done);
});
it("should open a XP firefox browser", function(done) {

@@ -53,8 +50,8 @@ this.timeout(TIMEOUT);

});
it("should mark job as passed", function(done) {
configHelper.jobPassed(browser.sessionID, done);
});
});
describe("browser.defaultCapabilities", function() {
var browser;
after(function(done) {
configHelper.jobPassed(browser.sessionID, done);
});
it("should open a LINUX chrome browser", function(done) {

@@ -68,2 +65,3 @@ this.timeout(TIMEOUT);

browser.defaultCapabilities.tags = ['wd', 'test'];
browser.defaultCapabilities["record-video"] = false;
browser.defaultCapabilities.should.eql({

@@ -75,3 +73,4 @@ browserName: 'chrome',

name: 'browser init using defaultCapabilities',
tags: ['wd', 'test']
tags: ['wd', 'test'],
"record-video": false
});

@@ -91,8 +90,8 @@ browser.init(function(err) {

});
it("should mark job as passed", function(done) {
configHelper.jobPassed(browser.sessionID, done);
});
});
describe("desired only", function() {
var browser;
after(function(done) {
configHelper.jobPassed(browser.sessionID, done);
});
it("should open a WINDOWS explorer browser", function(done) {

@@ -111,3 +110,4 @@ this.timeout(TIMEOUT);

name: 'browser init using desired',
tags: ['wd', 'test']
tags: ['wd', 'test'],
"record-video": false
};

@@ -127,8 +127,8 @@ browser.init(desired, function(err) {

});
it("should mark job as passed", function(done) {
configHelper.jobPassed(browser.sessionID, done);
});
});
describe("desired overiding defaultCapabilities", function() {
var browser;
after(function(done) {
configHelper.jobPassed(browser.sessionID, done);
});
it("should open a firefox browser", function(done) {

@@ -140,2 +140,3 @@ this.timeout(TIMEOUT);

browser.defaultCapabilities.tags = ['wd', 'test'];
browser.defaultCapabilities["record-video"] = false;
browser.defaultCapabilities.should.eql({

@@ -147,3 +148,4 @@ browserName: 'chrome',

name: 'browser init overide',
tags: ['wd', 'test']
tags: ['wd', 'test'],
"record-video": false
});

@@ -164,2 +166,5 @@ browser.init({

});
it("should mark job as passed", function(done) {
configHelper.jobPassed(browser.sessionID, done);
});
});

@@ -166,0 +171,0 @@ });

@@ -63,3 +63,4 @@ /*global describe,before,it,after */

name: name,
tags: tags
tags: tags,
"record-video": false
}),

@@ -66,0 +67,0 @@ jar: false /* disable cookies: avoids CSRF issues */

@@ -15,3 +15,4 @@ /*global describe,before,it,after */

browserName: 'chrome',
tags: ['wd', 'test']
tags: ['wd', 'test'],
"record-video": false
};

@@ -22,3 +23,4 @@

browserName: 'firefox',
tags: ['wd', 'test']
tags: ['wd', 'test'],
"record-video": false
};

@@ -31,3 +33,4 @@

platform: 'Windows 2008',
tags: ['wd', 'test']
tags: ['wd', 'test'],
"record-video": false
};

@@ -34,0 +37,0 @@

Sorry, the diff of this file is not supported yet

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