MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / bazelJava

Function bazelJava

javascript/selenium-webdriver/testing/index.js:633–643  ·  view source on GitHub ↗

* Bazel's hermetic java, from `SE_BAZEL_JAVA_LOCATION` (a file holding the `$(JAVA)` path). * @return {(string|undefined)} the java executable, or undefined to use the server's default.

()

Source from the content-addressed store, hash-verified

631 * @return {(string|undefined)} the java executable, or undefined to use the server's default.
632 */
633function bazelJava() {
634 const javaLocation = process.env['SE_BAZEL_JAVA_LOCATION']
635 if (!javaLocation) {
636 return undefined
637 }
638 // $(JAVA) is an exec path (external/<repo>/...); without the prefix it is a runfiles path.
639 const execPath = fs.readFileSync(locate(javaLocation), { encoding: 'utf8' }).trim()
640 const java = locate(execPath.replace(/^external\//, ''))
641 // Resolve the JDK symlink to its real path to dodge a Windows JVM bug mapping lib\modules.
642 return process.platform === 'win32' ? fs.realpathSync(java) : java
643}
644
645/** Browser name -> [driver env var, browser env var, vendor options key], for a Grid slot. */
646const GRID_BROWSERS = {

Callers 1

suiteFunction · 0.85

Calls 1

locateFunction · 0.85

Tested by

no test coverage detected