How to use the webdriver/package.json.version function in webdriver

To help you get started, we’ve selected a few webdriver 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 saucelabs / speedo / src / runner.js View on Github external
import { remote } from 'webdriverio'
import webdriverPkg from 'webdriver/package.json'

import ultradumbBenchmarkScript from './scripts/benchmark'
import userAgentScript from './scripts/userAgent'
import speedoPkg from '../package.json'
import { getMetricParams, getThrottleNetworkParam } from './utils'
import { MOBILE_DEVICES, JANKINESS_COMMAND } from './constants'

const MAX_RETRIES = 3
const speedoUserAgent = `webdriver/${webdriverPkg.version} (Speedo/${speedoPkg.version})`

/**
 * script that runs performance test on Sauce Labs
 *
 * @param  {String} username   name of user account
 * @param  {String} accessKey  access key of user account
 * @param  {Object} argv       command line arguments
 * @param  {String} name       name of the test
 * @param  {String} build      name of the build
 * @param  {String} logDir     path to directory to store logs
 * @return {Object}            containing result and detail information of performance test
 */
export default async function runPerformanceTest(
    username, accessKey, argv, name, build, logDir, checkJankiness, retryCnt = 0
) {
    const { site, platformName, browserVersion, tunnelIdentifier, parentTunnel, crmuxdriverVersion } = argv

webdriver

A Node.js bindings implementation for the W3C WebDriver and Mobile JSONWire Protocol

MIT
Latest version published 2 days ago

Package Health Score

94 / 100
Full package analysis