use of com.coveros.selenified.application.App in project selenified by Coveros.
the class ActionGetIT method getSelectedValuesNotExistTest.
@Test(groups = { "integration", "actions", "get" }, description = "An integration test to check the getSelectedValues method")
public void getSelectedValuesNotExistTest() {
// use this object to manipulate the app
App app = this.apps.get();
// perform some actions
String[] value = app.newElement(Locator.ID, "non-existent-name", 0).get().selectedValues();
Assert.assertNull(value);
// verify no issues
finish();
}
use of com.coveros.selenified.application.App in project selenified by Coveros.
the class ActionGetIT method getCookieTest.
@Test(groups = { "integration", "actions", "get", "cookie" }, description = "An integration test to check the getCookie method")
public void getCookieTest() throws IOException, ParseException {
// the cookie date
String dateval = "2019-12-18T12:00:00";
DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
df.setTimeZone(TimeZone.getTimeZone("UTC"));
// use this object to manipulate the app
App app = this.apps.get();
// perform some actions
Cookie cookie = app.get().cookie("cookie");
Assert.assertEquals(cookie, new Cookie("cookie", "cookietest", "/", df.parse(dateval)));
// verify no issues
finish();
}
use of com.coveros.selenified.application.App in project selenified by Coveros.
the class ActionGetIT method getCssNotExistTest.
@Test(groups = { "integration", "actions", "get" }, description = "An integration test to check the getCss method")
public void getCssNotExistTest() {
// use this object to manipulate the app
App app = this.apps.get();
// perform some actions
String css = app.newElement(Locator.ID, "non-existent-name").get().css("display");
Assert.assertNull(css);
// verify no issues
finish();
}
use of com.coveros.selenified.application.App in project selenified by Coveros.
the class ActionGetIT method getTableColumnsTest.
@Test(groups = { "integration", "actions", "get" }, description = "An integration test to check the getTableColumn method")
public void getTableColumnsTest() {
// use this object to manipulate the app
App app = this.apps.get();
// perform some actions
List<List<WebElement>> columns = app.newElement(Locator.ID, "table", 1).get().tableColumns();
Assert.assertEquals(columns.size(), 4);
Assert.assertEquals(columns.get(1).get(0).getText(), "Company");
Assert.assertEquals(columns.get(1).get(1).getText(), "Alfreds Futterkiste");
Assert.assertEquals(columns.get(1).get(2).getText(), "Centro comercial Moctezuma");
Assert.assertEquals(columns.get(1).get(3).getText(), "Ernst Handel");
Assert.assertEquals(columns.get(1).get(4).getText(), "Island Trading");
Assert.assertEquals(columns.get(1).get(5).getText(), "Laughing Bacchus Winecellars");
Assert.assertEquals(columns.get(1).get(6).getText(), "Magazzini Alimentari Riuniti");
// verify no issues
finish();
}
use of com.coveros.selenified.application.App in project selenified by Coveros.
the class ActionGetIT method getSelectValuesTest.
@Test(groups = { "integration", "actions", "get" }, description = "An integration test to check the getSelectOptions method")
public void getSelectValuesTest() {
// use this object to manipulate the app
App app = this.apps.get();
// perform some actions
String[] options = app.newElement(Locator.NAME, "car_list").get().selectValues();
Assert.assertEquals(options, new String[] { "volvo", "saab", "mercedes", "audi" });
// verify no issues
finish();
}
Aggregations