com.rational.test.ft.script

Class ScriptCommandFlags

  • java.lang.Object
    • com.rational.test.ft.script.ScriptCommandFlags


  • public class ScriptCommandFlags
    extends java.lang.Object
    This class provides a base set of command flags that may apply to a TestObject based command. For example, a TestObject may be DISABLED or NOT_SHOWING, that is, invisible when an action is performed against it. Actions must be performed against the object when it is in the appropriate state. For example, you may want to wait for an object to become ENABLED before acting upon it.
    Since:
    RFT1.0
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int DEFAULT_FLAGS
      Defines the expected default state.
      static int DISABLED
      Specifies that a GUITestObject is disabled.
      static int ENABLED
      Specifies that a GUITestObject is enabled.
      static int LOADED
      Indicates that the browser is loaded.
      static int LOADING
      Indicates that the browser is loading.
      static int MAY_EXIT
      Marks a command as suitable for terminating the application under test.
      static int NO_FLAGS
      Asserts that the state is not relevant in some cases.
      static int NOT_SHOWING
      Specifies that a GUITestObject is not visible.
      static int READY
      Indicates that the browser is ready.
      static int SHOWING
      Specifies that a GUITestObject is visible.
      static int UNINITIALIZED
      Indicates that the browser is uninitialized.
      static int UNIX_ONLY
      Marks a command as suitable for running on a UNIX platform.
      static int WINDOWS_ONLY
      Marks a command as run on a Windows platform only.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ScriptCommandFlags(long flags) 
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean check(long expected) 
      long getFlags()
      Propagates the flags.
      java.lang.String getFlagsText()
      Returns the textual representation of the flags
      static java.lang.String getFlagsText(long flags) 
      static java.lang.String getFlagsText(long flags, java.lang.String orOperator) 
      int getReadyState()
      Returns true if these flags reflect a READY state in the associated browser.
      boolean isEnabled()
      Returns true if these flags reflect an ENABLED state in the associated TestObject.
      boolean isMayExit()
      Returns true if these flags reflect a MAY_EXIT flag.
      boolean isShowing()
      Returns true if these flags reflect a SHOWING state in the associated TestObject.
      boolean isUnixOnly()
      Returns true if these flags reflect a UNIX_ONLY flag.
      boolean isWindowsOnly()
      Returns true if these flags reflect a WINDOWS_ONLY flag.
      void setEnabled(boolean enabled)
      Sets the enabled bit to the specified setting.
      void setReady(int readyFlag)
      Sets the ready bits to the specified setting.
      void setShowing(boolean showing)
      Sets the showing bit to the specified setting.
      java.lang.String toString()
      Returns a textual representation of this object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • ENABLED

        public static final int ENABLED
        Specifies that a GUITestObject is enabled. This is the default.
        See Also:
        Constant Field Values
      • DISABLED

        public static final int DISABLED
        Specifies that a GUITestObject is disabled. The default is for the object to be enabled.
        See Also:
        Constant Field Values
      • SHOWING

        public static final int SHOWING
        Specifies that a GUITestObject is visible. This is the default.
        See Also:
        Constant Field Values
      • NOT_SHOWING

        public static final int NOT_SHOWING
        Specifies that a GUITestObject is not visible. The default is for the object to be SHOWING.
        See Also:
        Constant Field Values
      • READY

        public static final int READY
        Indicates that the browser is ready. This is the default.
        See Also:
        Constant Field Values
      • LOADED

        public static final int LOADED
        Indicates that the browser is loaded. The default is for a browser to be READY.
        See Also:
        Constant Field Values
      • LOADING

        public static final int LOADING
        Indicates that the browser is loading. The default is for a browser to be READY.
        See Also:
        Constant Field Values
      • UNINITIALIZED

        public static final int UNINITIALIZED
        Indicates that the browser is uninitialized. The default is for a browser to be READY.
        See Also:
        Constant Field Values
      • MAY_EXIT

        public static final int MAY_EXIT
        Marks a command as suitable for terminating the application under test.
        See Also:
        Constant Field Values
      • WINDOWS_ONLY

        public static final int WINDOWS_ONLY
        Marks a command as run on a Windows platform only.
        See Also:
        Constant Field Values
      • UNIX_ONLY

        public static final int UNIX_ONLY
        Marks a command as suitable for running on a UNIX platform.
        See Also:
        Constant Field Values
      • DEFAULT_FLAGS

        public static final int DEFAULT_FLAGS
        Defines the expected default state.
        See Also:
        Constant Field Values
      • NO_FLAGS

        public static final int NO_FLAGS
        Asserts that the state is not relevant in some cases. This state is reserved.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ScriptCommandFlags

        public ScriptCommandFlags(long flags)
    • Method Detail

      • check

        public boolean check(long expected)
      • isEnabled

        public boolean isEnabled()
        Returns true if these flags reflect an ENABLED state in the associated TestObject.
        Returns:
        true if the associated TestObject is enabled
      • isShowing

        public boolean isShowing()
        Returns true if these flags reflect a SHOWING state in the associated TestObject.
        Returns:
        true if the associated TestObject is showing
      • getReadyState

        public int getReadyState()
        Returns true if these flags reflect a READY state in the associated browser.
        Returns:
        true if the associated browser is READY
      • isMayExit

        public boolean isMayExit()
        Returns true if these flags reflect a MAY_EXIT flag.
        Returns:
        true if the associated comand is MAY_EXIT
      • isWindowsOnly

        public boolean isWindowsOnly()
        Returns true if these flags reflect a WINDOWS_ONLY flag.
        Returns:
        true if the associated comand is WINDOWS_ONLY
      • isUnixOnly

        public boolean isUnixOnly()
        Returns true if these flags reflect a UNIX_ONLY flag.
        Returns:
        true if the associated comand is UNIX_ONLY
      • setEnabled

        public void setEnabled(boolean enabled)
        Sets the enabled bit to the specified setting.
      • setShowing

        public void setShowing(boolean showing)
        Sets the showing bit to the specified setting.
      • setReady

        public void setReady(int readyFlag)
        Sets the ready bits to the specified setting. The parameter must be either READY, LOADED, LOADING or UNINITIALIZED.
        Parameters:
        readyFlag - an appropriate browser state flag
        Since:
        RFT1.0
      • getFlagsText

        public java.lang.String getFlagsText()
        Returns the textual representation of the flags
        Since:
        RFT1.1
      • getFlagsText

        public static java.lang.String getFlagsText(long flags)
      • getFlagsText

        public static java.lang.String getFlagsText(long flags,
                                                    java.lang.String orOperator)
      • toString

        public java.lang.String toString()
        Returns a textual representation of this object.
        Overrides:
        toString in class java.lang.Object
      • getFlags

        public long getFlags()
        Propagates the flags. For internal use only.