UNPKG

appium-geckodriver

Version:

Appium driver for Gecko-based browsers and web views

31 lines 1.31 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.geckodriverCheck = exports.GeckodriverCheck = void 0; const utils_1 = require("./utils"); const support_1 = require("@appium/support"); const GD_DOWNLOAD_LINK = 'https://github.com/mozilla/geckodriver/releases'; const GD_BINARY = `geckodriver${support_1.system.isWindows() ? '.exe' : ''}`; /** @satisfies {import('@appium/types').IDoctorCheck} */ class GeckodriverCheck { async diagnose() { const gdPath = await (0, utils_1.resolveExecutablePath)(GD_BINARY); return gdPath ? support_1.doctor.ok(`${GD_BINARY} is installed at: ${gdPath}`) : support_1.doctor.nok(`${GD_BINARY} cannot be found`); } async fix() { return (`${GD_BINARY} is required to pass W3C commands to the remote browser. ` + `Please download the binary from ${GD_DOWNLOAD_LINK} and store it ` + `to any folder listed in the PATH environment variable. Folders that ` + `are currently present in PATH: ${process.env.PATH}`); } hasAutofix() { return false; } isOptional() { return false; } } exports.GeckodriverCheck = GeckodriverCheck; exports.geckodriverCheck = new GeckodriverCheck(); //# sourceMappingURL=required-checks.js.map