Skip to content

Negative Assertions


assertElementNotPresent

Description: This function will assert if the Element is not present.

ObjectName Action Input Condition Reference
mobileObject 🟢 assertElementNotPresent
@Action(object = ObjectType.APP, desc = "Assert if [<Object>] is not present")
public void assertElementNotPresent() {
    assertNotElement(!elementPresent());
}

assertElementNotDisplayed

Description: This function will assert if the Element is not displayed.

ObjectName Action Input Condition Reference
mobileObject 🟢 assertElementNotDisplayed
@Action(object = ObjectType.APP, desc = "Assert if [<Object>] is not displayed")
public void assertElementNotDisplayed() {
    assertNotElement(!elementDisplayed());
}

assertElementNotSelected

Description: This function will assert if the Element is not selected.

ObjectName Action Input Condition Reference
mobileObject 🟢 assertElementNotSelected
@Action(object = ObjectType.APP, desc = "Assert if [<Object>] is not selected")
public void assertElementNotSelected() {
    assertNotElement(!elementSelected());

assertElementNotEnabled

Description: This function will assert if the Element is not enabled.

ObjectName Action Input Condition Reference
mobileObject 🟢 assertElementNotEnabled
@Action(object = ObjectType.APP, desc = "Assert if [<Object>] is not enabled")
public void assertElementNotEnabled() {
    assertNotElement(!elementEnabled());