webdriverjs
Advanced tools
Comparing version 1.6.0 to 1.6.1
# CHANGELOG | ||
## v1.6.1 (2014-05-14) | ||
* fixed tap position | ||
## v1.6.0 (2014-04-04) | ||
@@ -4,0 +7,0 @@ * allow parenthesized xpath expressions (thanks to @zauberpony) |
@@ -36,6 +36,4 @@ module.exports = function tap (selector, x, y, tapCount, touchCount, duration, callback) { | ||
// add 64px (Safari iOS7 statusbar height) because we are only able | ||
// to tap on an element location relativ to current viewport | ||
this.scroll(0, location.y - 100) | ||
.touchTap(tapCount, touchCount, duration, location.x + (size.width / 2), 100 + (size.height / 2) + 64, null, callback) | ||
.touchTap(tapCount, touchCount, duration, location.x + (size.width / 2), 100 + (size.height / 2), null, callback) | ||
.pause(250); | ||
@@ -42,0 +40,0 @@ |
module.exports = function alertDismiss (callback) { | ||
var requestOptions = { | ||
path:"/session/:sessionId/dismiss_alert", | ||
method:"POST" | ||
path: '/session/:sessionId/dismiss_alert', | ||
method: 'POST' | ||
}; | ||
@@ -7,0 +7,0 @@ |
{ | ||
"name": "webdriverjs", | ||
"description": "A nodejs bindings implementation for selenium 2.0/webdriver", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"homepage": "https://github.com/camme/webdriverjs", | ||
@@ -6,0 +6,0 @@ "author": "camilo tapia <camilo.tapia@gmail.com>", |
@@ -205,11 +205,13 @@ Webdriver/selenium 2.0 javascript bindings for nodejs [](https://travis-ci.org/camme/webdriverjs) [](https://coveralls.io/r/camme/webdriverjs?branch=master) | ||
If you which to extend with your own set of commands there is a method | ||
If you want to extend the client with your own set of commands there is a method | ||
called `addCommand` available from the client object: | ||
```js | ||
// create a command the returns the current url and title as one result | ||
// just to show an example | ||
var client = require("webdriverjs").remote(); | ||
// create a command the returns the current url and title as one result | ||
// just to show an example | ||
client.addCommand("getUrlAndTitle", function(cb) { | ||
// last parameter has to be a callback function that needs to be called | ||
// when the command has finished (otherwise the queue stops) | ||
client.addCommand("getUrlAndTitle", function(customVar, cb) { | ||
this.url(function(err,urlResult) { | ||
@@ -219,2 +221,3 @@ this.getTitle(function(err,titleResult) { | ||
cb(err,specialResult); | ||
console.log(customVar); // "a custom variable" | ||
}) | ||
@@ -227,3 +230,3 @@ }); | ||
.url('http://www.github.com') | ||
.getUrlAndTitle(function(err,result){ | ||
.getUrlAndTitle('a custom variable',function(err,result){ | ||
assert.equal(null, err) | ||
@@ -230,0 +233,0 @@ assert.strictEqual(result.url,'https://github.com/'); |
932068
221
8595
404
21