use of com.coveros.selenified.element.Element in project selenified by Coveros.
the class ElementTest method checkPrettyOutputEndTest.
@Test
public void checkPrettyOutputEndTest() {
Element element = new Element(null, null, Locator.ID, "myId");
Assert.assertEquals(element.prettyOutputEnd(), "element with <i>ID</i> of <i>myId</i>.");
}
use of com.coveros.selenified.element.Element in project selenified by Coveros.
the class ElementTest method checkFullElementWebDriverTest.
@Test
public void checkFullElementWebDriverTest() {
Element element = new Element(null, null, Locator.ID, "myId", 2);
Assert.assertNull(element.getDriver());
}
use of com.coveros.selenified.element.Element in project selenified by Coveros.
the class ElementIT method checkChildTest.
@Test(groups = { "integration", "element" }, description = "An integration test to check that a child element is properly located")
public void checkChildTest() {
// use this object to manipulate the app
App app = this.apps.get();
// perform some actions
Element table = app.newElement(Locator.ID, "table");
Element cell = table.findChild(app.newElement(Locator.TAGNAME, "th"));
cell.assertEquals().text("");
// verify no issues
finish();
}
use of com.coveros.selenified.element.Element in project selenified by Coveros.
the class ConflictAIT method conflictingTestName.
@Test(groups = { "integration", "conflict" }, description = "A sample test to show how to loop through elements with multiple matches")
public void conflictingTestName() {
System.setProperty("packageResults", "true");
// 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();
System.setProperty("packageResults", "false");
}
use of com.coveros.selenified.element.Element in project selenified by Coveros.
the class SimpleSampleIT method sampleTestLoopThroughElements.
@Test(groups = { "sample" }, description = "A sample test to show how to loop through elements with multiple matches")
public void sampleTestLoopThroughElements() {
// 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();
}