use of com.seleniumtests.it.driver.support.pages.DriverTestAngularFrame in project seleniumRobot by bhecquet.
the class GenericMultiBrowserTest method exposeTestPage.
@BeforeClass(groups = { "it", "ut", "upload", "ie" })
public void exposeTestPage(final ITestContext testNGCtx) throws Exception {
// skip following if driver is already defined from an other test
if (driver != null) {
return;
}
if (browserType == null || !installedBrowsers.contains(browserType)) {
return;
}
localAddress = Inet4Address.getLocalHost().getHostAddress();
// localAddress = Inet4Address.getByName("localhost").getHostAddress();
server = new WebServer(localAddress, getPageMapping());
server.expose();
logger.info(String.format("exposing server on http://%s:%d", localAddress, server.getServerHost().getPort()));
initThreadContext(testNGCtx);
initBeforeMethod();
try {
switch(testPageName) {
case "DriverTestPageWithoutFixedPattern":
testPageUrl = String.format("http://%s:%d/testWithoutFixedPattern.html", localAddress, server.getServerHost().getPort());
testPageWithoutPattern = new DriverTestPageWithoutFixedPattern(true, testPageUrl);
break;
case "DriverTestPage":
testPageUrl = String.format("http://%s:%d/test.html", localAddress, server.getServerHost().getPort());
testPage = new DriverTestPage(true, testPageUrl);
break;
case "DriverTestPageNativeActions":
testPageUrl = String.format("http://%s:%d/test.html", localAddress, server.getServerHost().getPort());
testPageNativeActions = new DriverTestPageNativeActions(true, testPageUrl);
break;
case "DriverTestPageObjectFactory":
testPageUrl = String.format("http://%s:%d/test.html", localAddress, server.getServerHost().getPort());
testPageObjectFactory = new DriverTestPageObjectFatory(true, testPageUrl);
break;
case "DriverTestAngularFrame":
testPageUrl = String.format("http://%s:%d/testAngularIFrame.html", localAddress, server.getServerHost().getPort());
angularFramePage = new DriverTestAngularFrame(true, testPageUrl);
break;
case "DriverSubAngularTestPage":
testPageUrl = String.format("http://%s:%d/angularApp/index.html", localAddress, server.getServerHost().getPort());
angularPage = new DriverSubAngularTestPage(true, testPageUrl);
break;
case "DriverScrollingTestPage":
testPageUrl = String.format("http://%s:%d/testScrolling.html", localAddress, server.getServerHost().getPort());
scrollingTestPage = new DriverScrollingTestPage(true, testPageUrl);
break;
case "DriverTestPageSalesforceLightning":
lightningPage = new DriverTestPageSalesforceLightning();
break;
}
} catch (Exception e) {
logger.error("Error opening page");
logger.error(WebUIDriver.getWebDriver(true).getPageSource());
throw e;
}
driver = WebUIDriver.getWebDriver(true);
}
Aggregations