How to use the wd.configureHttp 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 ustwo / ustwo.com-frontend / test / integration / sanity.js View on Github external
explorer: {
    browserName: 'internet explorer',
    platform: 'Windows 7',
    screenResolution: '1280x1024',
    version: '10'
  },
  android: {
    browserName: 'android',
    platform: 'Linux',
    deviceOrientation: 'portrait',
    version: '4.4'
  }
};

// http configuration, not needed for simple runs
wd.configureHttp( {
  timeout: 60000,
  retryDelay: 15000,
  retries: 5
});

// building desired capability
const browserKey = process.env.BROWSER || 'explorer';
const proxyName = process.env.PROXY_NAME;
let desired = desireds[browserKey];
desired.name = 'testing with ' + browserKey;
desired.tags = ['integration'];
desired.tunnelIdentifier = process.env.TUNNEL || 'nouser';

// selectors and strings
const navigation = '.navigation';
const navigationToggle = navigation + ' .navigation-toggle';
github appium / appium / test / helpers / session.js View on Github external
"use strict";
var env = require('./env')
  , wd = require("wd")
  , Q = require("q")
  , _ = require("underscore")
  , iosReset = require('./reset').iosReset
  , androidUninstall = require('./reset').androidUninstall;

require('colors');

wd.configureHttp(env.HTTP_CONFIG);

var trimToLength = function (str, length) {
  return (str && str.length > length) ?
    str.substring(0, length) + '...' : str;
};

module.exports.initSession = function (desired, opts) {
  desired = desired || {};
  opts = opts || {};

  var deferred = Q.defer(),
      browser,
      initialized;

  wd.addPromiseChainMethod('clickBack', function () {
    var backEl;