Class AlertAssert

    • Field Summary

      • Fields inherited from class org.assertj.core.api.AbstractAssert

        actual, info, myself, throwUnsupportedExceptionOnEquals
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      AlertStateAssert hasText​(String text)
      Check that the alert box contains the given text.
      AlertStateAssert isPresent()
      Check that an alert box is present.
      • Methods inherited from class org.assertj.core.api.AbstractAssert

        as, as, asList, asString, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, inBinary, inHexadecimal, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, setCustomRepresentation, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, withFailMessage, withRepresentation, withThreadDumpOnError
    • Constructor Detail

      • AlertAssert

        public AlertAssert​(AlertImpl actual)
    • Method Detail

      • hasText

        public AlertStateAssert hasText​(String text)
        Description copied from interface: AlertStateAssert
        Check that the alert box contains the given text.

        It fails assertion when

        • there is an alert box but the text in it doesn't contain the expected text,
        • there is no alert box at all.
        Specified by:
        hasText in interface AlertStateAssert
        Parameters:
        text - text to search for
        Returns:
        this assertion object