com.rational.test.ft.object.interfaces

Class ToggleTestObject

  • All Implemented Interfaces:
    IGraphical, IToggle
    Direct Known Subclasses:
    ToggleGUITestObject


    public class ToggleTestObject
    extends GuiTestObject
    implements IToggle
    Serves as the base TestObject implementation of the IToggle interface.
    Since:
    RFT6.1.1.1
    See Also:
    ToggleGUITestObject}
    • Constructor Detail

      • ToggleTestObject

        public ToggleTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mappedObject)
        For internal use.
        Since:
        RFT6.1.1.1
      • ToggleTestObject

        public ToggleTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mappedObject,
                                TestObject anchor)
        For internal use.
        Since:
        RFT6.1.1.1
      • ToggleTestObject

        public ToggleTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mappedObject,
                                TestObject anchor,
                                long scriptCommandFlags)
        For internal use.
        Since:
        RFT6.1.1.1
      • ToggleTestObject

        public ToggleTestObject(com.rational.test.ft.object.TestObjectReference ref)
        For internal use.
        Since:
        RFT6.1.1.1
      • ToggleTestObject

        public ToggleTestObject(TestObject obj)
        Constructs one ToggleTestObject from another TestObject. Both are references to the same object.
        Since:
        RFT6.1.1.1
    • Method Detail

      • setState

        public void setState(State state)
        Sets the state of the associated object.
        Specified by:
        setState in interface IToggle
        Parameters:
        state - one of the State values
        Detail description:
        Set the state of the associated object (Button or Checkbox for example). Throws an exception if the state change cannot be performed.
        Example:

        checkbox().setState(State.selected());
        Since:
        RFT6.1.1.1
        See Also:
        State
      • getState

        public State getState()
        Returns the state of the associated object.
        Specified by:
        getState in interface IToggle
        Returns:
        one of the State values
        Example:

        State stat = checkbox().getState();
        Since:
        RFT6.1.1.1
        See Also:
        State
      • select

        public void select()
        To select the associated object
        Specified by:
        select in interface IToggle
        Detail description:
        Sets the state of the associated object to STATE_SELECTED. The UnableToPerformActionException exception is thrown if this action cannot be performed.
        Example:

        checkbox.select();
        Since:
        RFT6.1.1.1
      • deselect

        public void deselect()
        To de-select the associated object
        Specified by:
        deselect in interface IToggle
        Detail description:
        Sets the state of the associated object to NOT_SELECTED. The UnableToPerformActionException exception is thrown if this action cannot be performed.
        Example:

        checkbox.deselect();
        Since:
        RFT6.1.1.1
      • indeterminate

        public void indeterminate()
        To change the state of the associated object to INDETERMINATE.
        Specified by:
        indeterminate in interface IToggle
        Detail description:
        Sets the state of the associated object to INDETERMINATE. The UnableToPerformActionException exception is thrown if this action cannot be performed. Most of the objects throw exceptions if the state is changed to INDETERMINATE. Use the method within the try - catch to handle exceptions
        Example:

        try{

        checkbox.indeterminate();

        }catch(Exception e}

        {}
        Since:
        RFT1.0