use of com.coveros.selenified.application.App in project selenified by Coveros.
the class ActionGetIT method getElementEvalTest.
@Test(groups = { "integration", "actions", "get" }, description = "An integration test to check the getEval method")
public void getElementEvalTest() {
// use this object to manipulate the app
App app = this.apps.get();
// perform some actions
String location = (String) app.newElement(Locator.ID, "disable_click", 0).get().eval("document.location");
Assert.assertNull(location);
// verify no issues
finish();
}
use of com.coveros.selenified.application.App in project selenified by Coveros.
the class ActionGetIT method getPromptTest.
@Test(groups = { "integration", "actions", "get" }, description = "An integration test to check the getPrompt method")
public void getPromptTest() {
// use this object to manipulate the app
App app = this.apps.get();
// perform some actions
app.newElement(Locator.ID, "prompt_button").click();
String prompt = app.get().prompt();
Assert.assertEquals(prompt, "What do you think?");
// verify no issues
finish();
}
use of com.coveros.selenified.application.App in project selenified by Coveros.
the class ActionGetIT method getAllAttributeNotExistTest.
@Test(groups = { "integration", "actions", "get" }, description = "A negative integration test to check the getAllAttribute method")
public void getAllAttributeNotExistTest() {
// use this object to manipulate the app
App app = this.apps.get();
// perform some actions
Map<String, String> attributes = app.newElement(Locator.ID, "non-existent-name").get().allAttributes();
Assert.assertEquals(attributes, new HashMap<>());
// verify 0 issue
finish();
}
use of com.coveros.selenified.application.App in project selenified by Coveros.
the class ActionGetIT method getTableRowTest.
@Test(groups = { "integration", "actions", "get" }, description = "An integration test to check the getTableRow method")
public void getTableRowTest() {
// use this object to manipulate the app
App app = this.apps.get();
// perform some actions
List<WebElement> row = app.newElement(Locator.ID, "table").get().tableRow(1);
Assert.assertEquals(row.size(), 4);
Assert.assertEquals(row.get(0).getText(), "President");
Assert.assertEquals(row.get(1).getText(), "Alfreds Futterkiste");
Assert.assertEquals(row.get(2).getText(), "Maria Anders");
Assert.assertEquals(row.get(3).getText(), "Germany");
// verify no issues
finish();
}
use of com.coveros.selenified.application.App in project selenified by Coveros.
the class ActionGetIT method getNumOfSelectOptionsTest.
@Test(groups = { "integration", "actions", "get" }, description = "An integration test to check the getNumOfSelectOptions method")
public void getNumOfSelectOptionsTest() {
// use this object to manipulate the app
App app = this.apps.get();
// perform some actions
int options = app.newElement(Locator.NAME, "car_list").get().numOfSelectOptions();
Assert.assertEquals(options, 4);
// verify no issues
finish();
}
Aggregations