Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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';
"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;