Skip to content

Commit

Permalink
Add touch doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ziczhu committed Dec 12, 2016
1 parent dbed67e commit 8886dd5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
11 changes: 11 additions & 0 deletions lib/macaca-wd.js
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,17 @@ function maximize() {}
*/
function frame(frameRef) {}

/**
* Apply touch actions on devices. Such as, tap/doubleTap/press/pinch/rotate/drag.
* @summary Support: iOS
* @see {@link https://w3c.github.io/webdriver/webdriver-spec.html#actions|POST /session/:sessionId/actions}
* @param {string} action Name of the action
* @param [object] args Parameters of the action
* @example driver.touch('doubleTap', { x: 100, y: 100 }); driver.elementById('info').touch('drag', { toX: 300, toY: 300 });
* @returns {Promise.<string>}
*/
function touch(action, args) {}

Object.defineProperty(module, "exports", {
get: function() {
var main = '../wd/lib/main';
Expand Down
3 changes: 1 addition & 2 deletions wd/lib/webdriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@ Webdriver.prototype._jsonWireCall = function(opts) {

// logging
httpUtils.emit(this, httpOpts.method, url, opts.data);
// console.log(httpOpts.method, url, opts.data);
// return;

// writting data
var data = opts.data || {};
httpOpts.prepareToSend(url, data);
Expand Down

0 comments on commit 8886dd5

Please sign in to comment.