I have page object I want to know how to write a method if no elelmenets are displayed or present pass the test case otherwise keep testing.
I'm trying to figure out or we should do try and catch or assertTrue.
@AndroidFindBy(id = "lakjdfaj");
List<MobileElement> texts;
public boolean doesNotPresent() {
Boolean notDisplayed = texts.isEmpty();
if(notDisplayed){
return true;
} else {
return false;
}
Aucun commentaire:
Enregistrer un commentaire