use of org.glassfish.admingui.devtests.BaseSeleniumTestClass in project Payara by payara.
the class SeleniumHelper method getSeleniumInstance.
public SeleniumWrapper getSeleniumInstance() {
if (selenium == null) {
if (Boolean.parseBoolean(SeleniumHelper.getParameter("debug", "false"))) {
logger.log(Level.INFO, "Creating new selenium instance");
}
String browser = getParameter("browser", "firefox");
if ("firefox".equals(browser)) {
driver = new FirefoxDriver();
} else if ("chrome".equals(browser)) {
driver = new ChromeDriver();
} else if ("ie".contains(browser)) {
driver = new InternetExplorerDriver();
}
elementFinder = new ElementFinder(driver);
selenium = new SeleniumWrapper(driver, getBaseUrl());
selenium.setTimeout("90000");
// Make sure the server has started and the user logged in
(new BaseSeleniumTestClass()).openAndWait("/", BaseSeleniumTestClass.TRIGGER_COMMON_TASKS, 480);
}
selenium.windowFocus();
selenium.windowMaximize();
selenium.setTimeout("90000");
return selenium;
}
Aggregations