Search in sources :

Example 6 with DriverTestPage

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);
}
Also used : DriverTestPage(com.seleniumtests.it.driver.support.pages.DriverTestPage) CustomEventFiringWebDriver(com.seleniumtests.driver.CustomEventFiringWebDriver) Dimension(org.openqa.selenium.Dimension) GenericDriverTest(com.seleniumtests.GenericDriverTest) Test(org.testng.annotations.Test)

Example 7 with DriverTestPage

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);
}
Also used : DriverTestPage(com.seleniumtests.it.driver.support.pages.DriverTestPage)

Example 8 with DriverTestPage

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();
}
Also used : DriverTestPage(com.seleniumtests.it.driver.support.pages.DriverTestPage) Test(org.testng.annotations.Test)

Example 9 with DriverTestPage

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();
}
Also used : DriverTestPage(com.seleniumtests.it.driver.support.pages.DriverTestPage) Test(org.testng.annotations.Test)

Example 10 with DriverTestPage

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);
}
Also used : DriverTestPage(com.seleniumtests.it.driver.support.pages.DriverTestPage) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

DriverTestPage (com.seleniumtests.it.driver.support.pages.DriverTestPage)15 Test (org.testng.annotations.Test)9 GenericDriverTest (com.seleniumtests.GenericDriverTest)3 GenericTest (com.seleniumtests.GenericTest)3 TestStepManager (com.seleniumtests.core.TestStepManager)2 CustomEventFiringWebDriver (com.seleniumtests.driver.CustomEventFiringWebDriver)2 TestStep (com.seleniumtests.reporter.logger.TestStep)2 Dimension (org.openqa.selenium.Dimension)2 WebDriver (org.openqa.selenium.WebDriver)2 BeforeClass (org.testng.annotations.BeforeClass)2 BeforeMethod (org.testng.annotations.BeforeMethod)2 BrowserType (com.seleniumtests.driver.BrowserType)1 DriverScrollingTestPage (com.seleniumtests.it.driver.support.pages.DriverScrollingTestPage)1 DriverSubAngularTestPage (com.seleniumtests.it.driver.support.pages.DriverSubAngularTestPage)1 DriverTestAngularFrame (com.seleniumtests.it.driver.support.pages.DriverTestAngularFrame)1 DriverTestPageNativeActions (com.seleniumtests.it.driver.support.pages.DriverTestPageNativeActions)1 DriverTestPageObjectFatory (com.seleniumtests.it.driver.support.pages.DriverTestPageObjectFatory)1 DriverTestPageSalesforceLightning (com.seleniumtests.it.driver.support.pages.DriverTestPageSalesforceLightning)1 DriverTestPageWithoutFixedPattern (com.seleniumtests.it.driver.support.pages.DriverTestPageWithoutFixedPattern)1 WebServer (com.seleniumtests.it.driver.support.server.WebServer)1