UNPKG

siesta-lite

Version:

Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers

86 lines (63 loc) 2.55 kB
/* Siesta 5.6.1 Copyright(c) 2009-2022 Bryntum AB https://bryntum.com/contact https://bryntum.com/products/siesta/license */ Role('Siesta.Launcher.CommandLineTool.WebDriverGenericTool', { has : { }, methods : { getChromeDriverServerPath : function (includeFileName) { var binDir = this.binDir if (this.isWindows) return binDir + "\\binary\\chromedriver\\windows" + (includeFileName ? "\\chromedriver.exe" : "") else { var binPath if (this.isMacOS) binPath = "/binary/chromedriver/macos" else { // linux branch if (this.is64Bit) binPath = "/binary/chromedriver/linux64" else binPath = "/binary/chromedriver/linux32" } return binDir + binPath + (includeFileName ? "/chromedriver" : "") } }, getGeckoDriverServerPath : function (includeFileName) { var binDir = this.binDir if (this.isWindows) return binDir + "\\binary\\geckodriver\\" + (this.is64Bit ? 'win64' : 'win32') + (includeFileName ? "\\geckodriver.exe" : "") else { var binPath if (this.isMacOS) binPath = "/binary/geckodriver/macos" else { // linux branch if (this.is64Bit) binPath = "/binary/geckodriver/linux64" else throw new Error("No geckodriver for Linux 32 bit") } return binDir + binPath + (includeFileName ? "/geckodriver" : "") } }, getIEDriverServerPath : function (includeFileName) { if (!this.isWindows) return var binDir = this.binDir var binPath if (this.is64Bit) binPath = "\\binary\\iedriver_win64" else binPath = "\\binary\\iedriver_win32" return binDir + binPath + (includeFileName ? "\\IEDriverServer.exe" : "") }, getEdgeDriverServerPath : function (includeFileName) { if (!this.isWindows) return return this.binDir + "\\binary\\edgedriver" + (includeFileName ? "\\MicrosoftWebDriver.exe" : "") } } // eof methods })