Search in sources :

Example 56 with App

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

the class ActionGetIT method negativeGetCookieExpirationTest.

@Test(groups = { "integration", "actions", "get", "cookie" }, description = "An integration negative test to check the getCookieExpiration method")
public void negativeGetCookieExpirationTest() {
    // use this object to manipulate the app
    App app = this.apps.get();
    // perform some actions
    Date cookie = app.get().cookieExpiration("badcookie");
    Assert.assertNull(cookie);
    // verify no issues
    finish();
}
Also used : App(com.coveros.selenified.application.App) Test(org.testng.annotations.Test)

Example 57 with App

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

the class ActionGetIT method getValueNotExistTest.

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

Example 58 with App

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

the class ActionGetIT method getTableRowsTest.

@Test(groups = { "integration", "actions", "get" }, description = "An integration test to check the getTableRow method")
public void getTableRowsTest() {
    // use this object to manipulate the app
    App app = this.apps.get();
    // perform some actions
    List<WebElement> rows = app.newElement(Locator.ID, "table", 1).get().tableRows();
    Assert.assertEquals(rows.size(), 7);
    Assert.assertTrue(rows.get(0).getText().matches("\\s*Company\\s*Contact\\s*Country"));
    Assert.assertTrue(rows.get(1).getText().matches("President\\s*Alfreds\\s*Futterkiste\\s*Maria\\s*Anders\\s*Germany"));
    // verify no issues
    finish();
}
Also used : App(com.coveros.selenified.application.App) WebElement(org.openqa.selenium.WebElement) Test(org.testng.annotations.Test)

Example 59 with App

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

the class ActionGetIT method getTableColumnTest.

@Test(groups = { "integration", "actions", "get" }, description = "An integration test to check the getTableColumn method")
public void getTableColumnTest() {
    // use this object to manipulate the app
    App app = this.apps.get();
    // perform some actions
    List<WebElement> column = app.newElement(Locator.ID, "table").get().tableColumn(1);
    Assert.assertEquals(column.size(), 7);
    Assert.assertEquals(column.get(0).getText(), "Company");
    Assert.assertEquals(column.get(1).getText(), "Alfreds Futterkiste");
    Assert.assertEquals(column.get(2).getText(), "Centro comercial Moctezuma");
    Assert.assertEquals(column.get(3).getText(), "Ernst Handel");
    Assert.assertEquals(column.get(4).getText(), "Island Trading");
    Assert.assertEquals(column.get(5).getText(), "Laughing Bacchus Winecellars");
    Assert.assertEquals(column.get(6).getText(), "Magazzini Alimentari Riuniti");
    // verify no issues
    finish();
}
Also used : App(com.coveros.selenified.application.App) WebElement(org.openqa.selenium.WebElement) Test(org.testng.annotations.Test)

Example 60 with App

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

the class ActionGetIT method getTableColumnNotExistTest.

@Test(groups = { "integration", "actions", "get" }, description = "An integration test to check the getTableColumn method")
public void getTableColumnNotExistTest() {
    // use this object to manipulate the app
    App app = this.apps.get();
    // perform some actions
    List<WebElement> column = app.newElement(Locator.ID, "non-existent-name").get().tableColumn(1);
    Assert.assertNull(column);
    // verify no issues
    finish();
}
Also used : App(com.coveros.selenified.application.App) WebElement(org.openqa.selenium.WebElement) 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