use of com.seleniumtests.it.driver.support.pages.DriverTestPage in project seleniumRobot by bhecquet.
the class TestPageObject method testResizeWindow.
@Test(groups = { "it" })
public void testResizeWindow() throws Exception {
SeleniumTestsContextManager.getThreadContext().setBrowser("*firefox");
driver = WebUIDriver.getWebDriver(true);
new DriverTestPage(true).resizeTo(600, 400);
Dimension viewPortSize = ((CustomEventFiringWebDriver) driver).getViewPortDimensionWithoutScrollbar();
Assert.assertEquals(viewPortSize.width, 600);
Assert.assertEquals(viewPortSize.height, 400);
}
use of com.seleniumtests.it.driver.support.pages.DriverTestPage in project seleniumRobot by bhecquet.
the class StubTestClassForDriverParallelTest method execute.
private void execute(String text) throws Exception {
DriverTestPage drvPage = new DriverTestPage(true);
synchronized (sync) {
threadCount += 1;
}
while (threadCount < maxThreads) {
WaitHelper.waitForMilliSeconds(5);
}
drvPage._writeSomething(text);
Assert.assertEquals(drvPage._getTextElementContent(), text);
}
use of com.seleniumtests.it.driver.support.pages.DriverTestPage in project seleniumRobot by bhecquet.
the class StubTestClassForDriverTest method testDriverShortKo.
@Test(groups = "stub")
public void testDriverShortKo() throws Exception {
SeleniumTestsContextManager.getThreadContext().setReplayTimeout(1);
new DriverTestPage(true)._writeSomethingOnNonExistentElement();
}
use of com.seleniumtests.it.driver.support.pages.DriverTestPage in project seleniumRobot by bhecquet.
the class StubTestClassForDriverTest method testDriverWithAssert.
@Test(groups = "stub")
public void testDriverWithAssert() throws Exception {
SeleniumTestsContextManager.getThreadContext().setReplayTimeout(1);
DriverTestPage page = new DriverTestPage(true);
page._reset();
Assert.assertTrue(false);
page._writeSomething();
}
use of com.seleniumtests.it.driver.support.pages.DriverTestPage in project seleniumRobot by bhecquet.
the class TestPageObject method initDriver.
@BeforeMethod(groups = { "it", "pageobject" })
public void initDriver(final ITestContext testNGCtx) throws Exception {
OSUtilityFactory.getInstance().killProcessByName("chrome", true);
initThreadContext(testNGCtx);
SeleniumTestsContextManager.getThreadContext().setBrowser("chrome");
testPage = new DriverTestPage(true);
}
Aggregations