How to use the browserstack.selenium_version function in browserstack

To help you get started, we’ve selected a few browserstack 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 mdittmer / web-apis / lib / remote / selenium / browserstack.es6.js View on Github external
function buildConfig(inputConfig) {
  let config = {};

  // Generally suffice with default Selenium version, except for some versions
  // of firefox, based on advice from BrowserStack Automate console and a bunch
  // of trial and error.
  if (inputConfig.browserName && inputConfig.browserName.toLowerCase() === 'firefox') {
    const version = parseInt(inputConfig.browser_version.split('.')[0], 10);
    if (version >= 48 && version <= 57)
      config['browserstack.selenium_version'] = '3.4.0';
  }

  Object.assign(config, inputConfig, base);
  console.log('Build with', config, url);
  return new webdriver.Builder().withCapabilities(config).usingServer(url)
    .build();
}
github bbody / CMD-Resume / scripts / generate-browserstack-karma-browsers.js View on Github external
browserList.push(key);

			var browserProfile = {
				'base': 'BrowserStack',
				'browser': browser.name,
				'os': os.name,
				'os_version': os.version,
				'browserstack.local': true
			};

			if (browser.specs) {
				browserProfile.specs = browser.specs;
			}

			if (browser['browserstack.selenium_version']) {
				browserProfile['browserstack.selenium_version'] = browser['browserstack.selenium_version'];
			}

			// If it is essential and the latest version add to essential list
			if (browser.essential) {
				var essentialKey = `bs__${os.name.replace(' ', '-')}_${os.version.replace(' ', '-')}__${browser.name}_Latest`;
				essentialBrowserList.push(essentialKey);
				browserList.push(key);
				if (!browserMap[essentialKey]) {
					browserMap[essentialKey] = browserProfile;
					essentialBrowserCapabilityList.push(browserProfile);
				}
			}

			var fullProfile = Object.assign({}, browserProfile, {'browser_version': version});

			fullBrowserCapabilityList.push(fullProfile);
github jwplayer / jw-showcase / protractor.browserstack.conf.js View on Github external
function createCapabilities (capabilities, tags) {

    capabilities['browserstack.user']             = env.BROWSERSTACK_USER || env.BS_USERNAME;
    capabilities['browserstack.key']              = env.BROWSERSTACK_KEY || env.BS_AUTHKEY;
    capabilities['browserstack.local']            = true;

    // Selenium 3.4.0 does not work great with IE11
    if (capabilities.browserName !== 'internet explorer') {
        capabilities['browserstack.selenium_version'] = '3.4.0';
    }

    capabilities.project = pkg.name;
    capabilities.build   = env.BROWSERSTACK_BUILD || pkg.version;

    capabilities.cucumberOpts = {
        format: 'json:./test/reports/' + composeReportName(capabilities) + '.json'
    };

    if (tags) {
        capabilities.cucumberOpts.tags = tags;
    }

    if (capabilities.browserName === 'internet explorer') {
        capabilities.ignoreProtectedModeSettings = true;
    }
github jwplayer / jw-showcase / protractor.conf.browserstack.js View on Github external
function (capabilities) {
        capabilities['browserstack.user']  = BROWSERSTACK_USER;
        capabilities['browserstack.key']   = BROWSERSTACK_KEY;
        capabilities['browserstack.local'] = true;

        // Selenium 3.6.0 does not work great with IE11
        if (capabilities.browserName !== 'internet explorer') {
            capabilities['browserstack.selenium_version'] = '3.4.0';
        }

        capabilities.project = pkg.name;
        capabilities.build   = env.BROWSERSTACK_BUILD || pkg.version;

        if (capabilities.browserName === 'internet explorer') {
            capabilities.ignoreProtectedModeSettings = true;
        }

        return capabilities;
    }
);
github linode / manager / packages / manager / e2e / config / browserstack.conf.js View on Github external
: browserConf['chrome'];
// Enable When browserstack support Selenium 3.13.0
// const seleniumSettings = require('./selenium-config');

const username = process.env.MANAGER_USER;
const password = process.env.MANAGER_PASS;

if (argv.local) {
  selectedBrowser['browserstack.local'] = true;
} else {
  selectedBrowser['browserstack.local'] = false;
}

// Enable When browserstack support Selenium 3.13.0
//selectedBrowser['browserstack.selenium_version'] = seleniumSettings.version;
selectedBrowser['browserstack.selenium_version'] = '3.11.0';

exports.config = merge(wdioMaster.config, {
  host: 'hub.browserstack.com',
  services: ['browserstack'],
  capabilities: [selectedBrowser],
  user: process.env.BROWSERSTACK_USERNAME,
  key: process.env.BROWSERSTACK_ACCESS_KEY,
  browserstackLocal: argv.local ? true : false,
  browserstackLocalForcedStop: true,
  waitforTimeout: 25000
});
github bbody / CMD-Resume / scripts / generate-browserstack-karma-browsers.js View on Github external
var key = `bs__${os.name.replace(' ', '-')}_${os.version.replace(' ', '-')}__${browser.name}_${version}`;
			browserList.push(key);

			var browserProfile = {
				'base': 'BrowserStack',
				'browser': browser.name,
				'os': os.name,
				'os_version': os.version,
				'browserstack.local': true
			};

			if (browser.specs) {
				browserProfile.specs = browser.specs;
			}

			if (browser['browserstack.selenium_version']) {
				browserProfile['browserstack.selenium_version'] = browser['browserstack.selenium_version'];
			}

			// If it is essential and the latest version add to essential list
			if (browser.essential) {
				var essentialKey = `bs__${os.name.replace(' ', '-')}_${os.version.replace(' ', '-')}__${browser.name}_Latest`;
				essentialBrowserList.push(essentialKey);
				browserList.push(key);
				if (!browserMap[essentialKey]) {
					browserMap[essentialKey] = browserProfile;
					essentialBrowserCapabilityList.push(browserProfile);
				}
			}

			var fullProfile = Object.assign({}, browserProfile, {'browser_version': version});