Search in sources :

Example 16 with App

use of com.coveros.selenified.application.App in project selenified by Coveros.

the class ActionDoIT method takeScreenshotHtmlUnitTest.

@Test(groups = { "integration", "actions", "screenshot", "do" }, description = "An integration test to check the takeScreenshot method")
public void takeScreenshotHtmlUnitTest() throws InvalidBrowserException, MalformedURLException {
    // use this object to manipulate the app
    App app = new App(Browser.HTMLUNIT, new DesiredCapabilities(), null);
    // perform some actions
    app.takeScreenshot("somefile");
    app.killDriver();
    // verify no issues
    finish();
}
Also used : App(com.coveros.selenified.application.App) DesiredCapabilities(org.openqa.selenium.remote.DesiredCapabilities) Test(org.testng.annotations.Test)

Example 17 with App

use of com.coveros.selenified.application.App in project selenified by Coveros.

the class ActionDoIT method typeNotInputTest.

@Test(groups = { "integration", "actions", "do", "type" }, description = "An integration negative test to check the type method")
public void typeNotInputTest() {
    // use this object to manipulate the app
    App app = this.apps.get();
    // perform some actions
    app.newElement(Locator.CLASSNAME, "click").type("This is a test");
    // verify 1 issue
    finish(1);
}
Also used : App(com.coveros.selenified.application.App) Test(org.testng.annotations.Test)

Example 18 with App

use of com.coveros.selenified.application.App in project selenified by Coveros.

the class ActionDoIT method clearInputTest.

@Test(groups = { "integration", "actions", "do", "clear" }, description = "An integration test to check the clear method")
public void clearInputTest() {
    // use this object to manipulate the app
    App app = this.apps.get();
    // perform some actions
    app.newElement(Locator.ID, "input_box").type("Text");
    app.newElement(Locator.ID, "input_box").assertEquals().value("Text");
    app.newElement(Locator.ID, "input_box").clear();
    app.newElement(Locator.ID, "input_box").assertEquals().value("");
    // verify no issues
    finish();
}
Also used : App(com.coveros.selenified.application.App) Test(org.testng.annotations.Test)

Example 19 with App

use of com.coveros.selenified.application.App in project selenified by Coveros.

the class ActionGetIT method getNumOfTableRowsNotExistTest.

@Test(groups = { "integration", "actions", "get" }, description = "An integration test to check the getNumOfTableRows method")
public void getNumOfTableRowsNotExistTest() {
    // use this object to manipulate the app
    App app = this.apps.get();
    // perform some actions
    int rows = app.newElement(Locator.ID, "non-existent-name", 0).get().numOfTableRows();
    Assert.assertEquals(rows, 0);
    // verify no issues
    finish();
}
Also used : App(com.coveros.selenified.application.App) Test(org.testng.annotations.Test)

Example 20 with App

use of com.coveros.selenified.application.App in project selenified by Coveros.

the class ActionGetIT method getAttributeNotExistTest.

@Test(groups = { "integration", "actions", "get" }, description = "An integration test to check the getAttribute method")
public void getAttributeNotExistTest() {
    // use this object to manipulate the app
    App app = this.apps.get();
    // perform some actions
    String attribute = app.newElement(Locator.ID, "non-existent-name").get().attribute("display");
    Assert.assertNull(attribute);
    // verify no issues
    finish();
}
Also used : App(com.coveros.selenified.application.App) Test(org.testng.annotations.Test)

Aggregations

App (com.coveros.selenified.application.App)501 Test (org.testng.annotations.Test)500 WebElement (org.openqa.selenium.WebElement)15 Cookie (org.openqa.selenium.Cookie)7 Element (com.coveros.selenified.element.Element)6 DateFormat (java.text.DateFormat)4 SimpleDateFormat (java.text.SimpleDateFormat)4 DesiredCapabilities (org.openqa.selenium.remote.DesiredCapabilities)4 File (java.io.File)2 InvalidBrowserException (com.coveros.selenified.exceptions.InvalidBrowserException)1 Call (com.coveros.selenified.services.Call)1 HTTP (com.coveros.selenified.services.HTTP)1 MalformedURLException (java.net.MalformedURLException)1