use of com.coveros.selenified.element.Element in project selenified by Coveros.
the class ActionWaitIT method setDefaultWaitElementTest.
@Test(groups = { "integration", "actions", "wait" }, description = "An integration test to check changing the default wait method")
public void setDefaultWaitElementTest() {
// use this object to manipulate the app
App app = this.apps.get();
// perform some actions
Element element = app.newElement(Locator.ID, "five_second_button");
element.waitFor().changeDefaultWait(3.0);
element.click();
// verify 1 issue
finish(1);
}
use of com.coveros.selenified.element.Element in project selenified by Coveros.
the class ConflictBIT method conflictingTestName.
@Test(groups = { "integration", "conflict" }, description = "A sample test to show how to loop through elements with multiple matches")
public void conflictingTestName() {
// use this object to manipulate the app
App app = this.apps.get();
// perform some actions
Element element = app.newElement(Locator.XPATH, "//form/input[@type='checkbox']");
for (int match = 0; match < element.get().matchCount(); match++) {
element.setMatch(match);
element.click();
element.assertState().checked();
}
// close out the test
finish();
}
use of com.coveros.selenified.element.Element in project selenified by Coveros.
the class ElementIT method checkMultipleChildTest.
@Test(groups = { "integration", "element" }, description = "An integration test to check that a child element is properly located")
public void checkMultipleChildTest() {
// use this object to manipulate the app
App app = this.apps.get();
// perform some actions
Element table = app.newElement(Locator.ID, "table");
Element body = table.findChild(app.newElement(Locator.TAGNAME, "tbody"));
Element row = body.findChild(app.newElement(Locator.TAGNAME, "tr"));
Element cell1 = row.findChild(app.newElement(Locator.TAGNAME, "th"));
cell1.assertEquals().text("President");
Element cell2 = row.findChild(app.newElement(Locator.TAGNAME, "td"));
cell2.assertEquals().text("Alfreds Futterkiste");
// verify no issues
finish();
}