Class AlertAssert

java.lang.Object
org.assertj.core.api.AbstractAssert<AlertAssert, AlertImpl>
io.fluentlenium.assertj.custom.AlertAssert
All Implemented Interfaces:
org.assertj.core.api.Assert<AlertAssert, AlertImpl>, org.assertj.core.api.Descriptable<AlertAssert>, org.assertj.core.api.ExtensionPoints<AlertAssert, AlertImpl>, AlertStateAssert

public class AlertAssert extends org.assertj.core.api.AbstractAssert<AlertAssert,AlertImpl> implements AlertStateAssert
Default implementation for alert assertions.
  • Field Summary

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

    actual, info, myself, objects, throwUnsupportedExceptionOnEquals
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    hasText (String text)
    Check that the alert box contains the given text.
    Check that an alert box is present.

    Methods inherited from class org.assertj.core.api.AbstractAssert

    areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.assertj.core.api.Descriptable

    as, as, as, describedAs
  • Constructor Details

    • AlertAssert

      public AlertAssert (AlertImpl actual)
  • Method Details

    • 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
    • isPresent

      public AlertStateAssert isPresent()
      Description copied from interface: AlertStateAssert
      Check that an alert box is present.
      Specified by:
      isPresent in interface AlertStateAssert
      Returns:
      this assertion object