Search in sources :

Example 41 with App

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

the class ActionGetIT method getSelectedValueNotSelectTest.

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

Example 42 with App

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

the class ActionGetIT method getSelectOptionsTest.

@Test(groups = { "integration", "actions", "get" }, description = "An integration test to check the getSelectOptions method")
public void getSelectOptionsTest() {
    // use this object to manipulate the app
    App app = this.apps.get();
    // perform some actions
    String[] options = app.newElement(Locator.NAME, "car_list").get().selectOptions();
    Assert.assertEquals(options, new String[] { "Volvo", "Saab", "Mercedes", "Audi" });
    // verify no issues
    finish();
}
Also used : App(com.coveros.selenified.application.App) Test(org.testng.annotations.Test)

Example 43 with App

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

the class ActionGetIT method getTableCellNotExistTest.

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

Example 44 with App

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

the class ActionGetIT method getSelectedValuesNotSelectTest.

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

Example 45 with App

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

the class ActionGetIT method getNumOfSelectOptionsNotExistTest.

@Test(groups = { "integration", "actions", "get" }, description = "An integration test to check the getNumOfSelectOptions method")
public void getNumOfSelectOptionsNotExistTest() {
    // use this object to manipulate the app
    App app = this.apps.get();
    // perform some actions
    int options = app.newElement(Locator.NAME, "non-existent-name", 0).get().numOfSelectOptions();
    Assert.assertEquals(options, 0);
    // 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