Search in sources :

Example 21 with App

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

the class ActionGetIT method getElementMatchCountNotExistTest.

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

Example 22 with App

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

the class ActionGetIT method getTextNotExistTest.

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

Example 23 with App

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

the class ActionGetIT method getAttributeNullTest.

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

Example 24 with App

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

the class ActionGetIT method getHtmlSourceTest.

@Test(groups = { "integration", "actions", "get" }, description = "An integration test to check the getHtmlSource method")
public void getHtmlSourceTest() {
    // use this object to manipulate the app
    App app = this.apps.get();
    // perform some actions
    app.newElement(Locator.ID, "submit_button", 0).click();
    String source = app.get().htmlSource();
    Assert.assertTrue(source.contains("You're on the next page"));
    // verify no issues
    finish();
}
Also used : App(com.coveros.selenified.application.App) Test(org.testng.annotations.Test)

Example 25 with App

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

the class ActionGetIT method getTableRowNoRowTest.

@Test(groups = { "integration", "actions", "get" }, description = "An integration test to check the getTableRow method")
public void getTableRowNoRowTest() {
    // use this object to manipulate the app
    App app = this.apps.get();
    // perform some actions
    List<WebElement> row = app.newElement(Locator.ID, "table", 0).get().tableRow(99);
    Assert.assertEquals(row, new ArrayList<>());
    // 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