com.hp.lft.sdk

Class WaitUntilTestObjectState

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


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

      Modifier and TypeMethod and Description
      static <T extends TestObject>
      boolean
      waitUntil(T testObject, WaitUntilTestObjectState.WaitUntilEvaluator<T> evaluator)
      Waits until the object in the AUT achieves the desired state (or until the UFT Developer object synchronization timeout (20 seconds) elapses.
      static <T extends TestObject>
      boolean
      waitUntil(T testObject, WaitUntilTestObjectState.WaitUntilEvaluator<T> evaluator, long totalTimeOutInMilliseconds)
      Waits until the object in the AUT achieves the desired state or until the specified timeout elapses.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WaitUntilTestObjectState

        public WaitUntilTestObjectState()
    • Method Detail

      • 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 an 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 UFT Developer 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 an error occurs during execution.