Class WaitUntilTestObjectState

java.lang.Object
com.hp.lft.sdk.WaitUntilTestObjectState

public class WaitUntilTestObjectState extends Object
This class provides the waitUntil static method, which can be used to wait until an object reaches a specific state.
  • Field Details

    • DEFAULT_TIMEOUT

      protected static long DEFAULT_TIMEOUT
  • Constructor Details

    • WaitUntilTestObjectState

      public WaitUntilTestObjectState()
  • Method Details

    • waitUntil

      public static <T extends TestObject> boolean waitUntil(T testObject, WaitUntilTestObjectState.WaitUntilEvaluator<T> evaluator, long totalTimeOutInMilliseconds) throws GeneralLeanFtException
      Waits until the object in the AUT achieves the desired state or until the specified timeout elapses. The state is evaluated by the provided WaitUntilEvaluator.
      Type Parameters:
      T - the concrete TestObject type.
      Parameters:
      testObject - the object whose state should be evaluated.
      evaluator - the WaitUntilEvaluator to use to evaluate the object state.
      totalTimeOutInMilliseconds - the time (in milliseconds) to wait until the desired state is achieved.
      Returns:
      true if the object achieved the desired state before the specified timeout, otherwise false.
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • waitUntil

      public static <T extends TestObject> boolean waitUntil(T testObject, WaitUntilTestObjectState.WaitUntilEvaluator<T> evaluator) throws GeneralLeanFtException
      Waits until the object in the AUT achieves the desired state (or until the object synchronization timeout (20 seconds) elapses. The state is evaluated by the WaitUntilEvaluator.
      Type Parameters:
      T - the concrete TestObject type.
      Parameters:
      testObject - the object whose state should be evaluated.
      evaluator - the WaitUntilEvaluator to use to evaluate the object state.
      Returns:
      true if the object achieved the desired state within 20 seconds, otherwise false.
      Throws:
      GeneralLeanFtException - if error occurs during execution