MCPcopy
hub / github.com/SeleniumHQ/selenium / isSelenium3x

Function isSelenium3x

javascript/selenium-webdriver/remote/util.js:36–42  ·  view source on GitHub ↗

* @param {string} seleniumStandalonePath path to standalone server * @returns {boolean}

(seleniumStandalonePath)

Source from the content-addressed store, hash-verified

34 * @returns {boolean}
35 */
36function isSelenium3x(seleniumStandalonePath) {
37 const javaPath = getJavaPath()
38
39 const execRes = cp.execFileSync(javaPath, ['-jar', seleniumStandalonePath, '--version'])
40
41 return execRes.toString().trim().startsWith('Selenium server version: 3')
42}
43
44/**
45 * @param {string} seleniumStandalonePath path to standalone server

Callers 1

formatSpawnArgsFunction · 0.85

Calls 2

getJavaPathFunction · 0.85
toStringMethod · 0.65

Tested by

no test coverage detected