How to use the wd.SPECIAL_KEYS function in wd

To help you get started, we’ve selected a few wd examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github FormidableLabs / full-stack-testing / test / func / spec / application.spec.js View on Github external
var app = require("../../../server");
var PORT = process.env.FUNC_PORT || 3003;
var HOST = process.env.TEST_HOST || "http://127.0.0.1:" + PORT;

// WD helpers.
// https://github.com/admc/wd/blob/master/lib/special-keys.js
var wd = require("wd");
var ENTER_KEY = wd.SPECIAL_KEYS.Enter;

// Rowdy helpers and adapter.
var rowdy = require("rowdy");
var adapter = rowdy.adapters.mocha;
var helpers = rowdy.helpers;

describe("func/application", function () {
  var client;
  var server;

  // --------------------------------------------------------------------------
  // Mocha
  // --------------------------------------------------------------------------
  // Set a Mocha global timeout of 10 seconds to allow for test wonkiness.
  this.timeout(10000);
github appium / appium / sample-code / examples / node / android-webview.js View on Github external
it("should switch to webview", function () {
    return driver
      .elementByName('buttonStartWebviewCD')
        .click()
      .sleep(5000)
      .contexts()
      .then(function (ctxs) {
        console.log(ctxs);
        return driver.context(ctxs[ctxs.length - 1]);
      })
      .elementById('name_input')
        .clear()
        .sendKeys('Appium User')
        .sendKeys(wd.SPECIAL_KEYS.Return)
      .sleep(1000)
      .source().then(function (source) {
        source.should.include('This is my way of saying hello');
        source.should.include('Appium User');
      });
  });
});
github jaredly / mocha-selenium / lib / helpers.js View on Github external
els[els.length - 1](function (err, el) {
      if (err) return then(err);
      el.type(wd.SPECIAL_KEYS.Tab, then);
    });
  });
github jlipps / yiewd / lib / yiewd.js View on Github external
if (typeof server === "undefined") {
    server = 'ondemand.saucelabs.com';
  } else if (server !== 'ondemand.saucelabs.com') {
    apiHostname = server;
  }
  if (typeof port === "undefined") {
    port = 80;
  }
  var d = yiewd.remote(server, port, userName, accessKey);
  _setSauceCreds(d, userName, accessKey, apiHostname);
  return d;
};

yiewd.TouchAction = wd.TouchAction;
yiewd.MultiAction = wd.MultiAction;
yiewd.SPECIAL_KEYS = wd.SPECIAL_KEYS;