import com.kms.katalon.core.webui.driver.DriverFactory
public class WebUICustomKeywords {
@Keyword
def openFirefoxBrowser(String firefoxPath, String firefoxDriver) {
//Set path to Firefox version
System.setProperty("webdriver.firefox.bin", firefoxPath)
//Set path to Firefox driver: \configuration\resources\drivers\firefox_win64\geckodriver.exe System.setProperty("webdriver.gecko.driver", firefoxDriver)
WebDriver driver = new FirefoxDriver()
DriverFactory.changeWebDriver(driver)
}
@Keyword
def openChromeBrowser(String chromeDriverPath, String chromePath) {
//Set path to chromedriver driver: \configuration\resources\drivers\chrome_win32\chromedriver.exe System.setProperty("webdriver.chrome.driver", chromeDriverPath)
ChromeOptions options = new ChromeOptions()
//Set path to Chrome binary options.setBinary(chromePath)
WebDriver driver = new ChromeDriver(options) DriverFactory.changeWebDriver(driver)
}
}