com.rational.test.ft.domain.html

Class PushbuttonProxy

  • All Implemented Interfaces:
    com.ibm.rational.test.ft.clearscript.IClearscript, com.rational.test.ft.domain.IChannelObject, com.rational.test.ft.domain.IDataDriven, com.rational.test.ft.domain.IGetInterestingRecogProsForDynFind, com.rational.test.ft.domain.IHtmlCustomDomainEnablement, com.rational.test.ft.domain.IInternalObjectStatus, com.rational.test.ft.domain.IProxyBase, com.rational.test.ft.domain.IQuickFind, com.rational.test.ft.domain.IXPathFind, com.rational.test.ft.object.interfaces.IGraphical


    public class PushbuttonProxy
    extends InputProxy
    implements com.ibm.rational.test.ft.clearscript.IClearscript
    Implements the Proxy for Html INPUT type=BUTTON, type=SUBMIT, type=RESET, type=IMAGE, and Html BUTTON elements

    • TestObject Interface: GuiTestObject

    • Supported Test Data Types:
      TypeDesciption
      text Button Visible Text ITestDataText

    • Default Recognition Properties:
      • .class
      • .classIndex
      • .id
      • .name
      • .title
      • .type
      • .value

    • Supported Canonical Properties:
      PropertyUsage
      .alt The value of the alt attribute an element.  This is the "alternate" text  for the element, frequently displayed by the browser when the mouse hovers over the element.
      .boundsA rectangle representing the bounding rectangle of the object in screen coordinates.
      .classThis is the  test object class name, for example "HtmlTable" for a <Table> element.
      .checked This is a boolean value indicating whether a checkboxed is currently checked (true) or not (false).
      .classNameThis the value of the class attribute of an element (used for stylesheets in HTML).
      .defaultChecked This is a boolean value for the defaultchecked attribute of the element.
      .defaultValue This is the value of the defaultValue attribute of the element.
      .disabled The value of the disabled attribute of an element, returned as a boolean.  If true then user input is currently disabled for this item.
      .idThis is the value of the id attribute of an element.
      .maxLength For an edit control (Input type=Text or TextArea) this indicates the maximum number of characters a user may enter.
      .nameThis is the value of the name attribute (Form elements and Frames only)
      .offsetHeightThe height of the element.
      .offsetLeftThe offset of the element from its offset parent in the DOM.
      .offsetTopThe offset of the element from its offset parent in the DOM.
      .offsetWidthThe width  of the element.
      .readOnly The value of the readonly attribute of an element.  A boolean value that  when true indicates the form element is read only.
      .screenLeftUpper left corner of bounding rectangle in screen coordinates, x component.
      .screenTopUpper left corner of bounding rectangle in screen coordinates, y component.
      .size The value of the size attribute of an element.  For a Select element this indicates the number of items displayed at once in the list.  If size > 1 then the list appears as listbox, otherwise the list appears as a Combodropdown.
      .src This is the value of the src attribute for the element. For images and image buttons this is a URL specifying the desired image file.
      .tagThis is the Html tag for the element
      .textThis is the text inside of the HTML tags for bounding the element.  For example, <A>This is an Anchor<IMG src=map.gif></a>   the text property will return "This is an Anchor.   All white space are combined and reduced to a single a blank character if consecutive white space characters are found.
      .titleThis is the value of the title attribute of an element.  This is frequently the text displayed when hovering over the element with the mouse.
      .type This is the value of the Type attribute of an element.  For example, for an Input element this will be text, password, checkbox, radio, submit, image, reset, button, hidden,orfile.
      .valueThis is the value of the value attribute of an element.  In Form elements this represents the value which will be sent when the form is posted.

    Since:
    RFT1.0
    • Constructor Detail

      • PushbuttonProxy

        public PushbuttonProxy(HtmlTestDomainImplementation domain,
                               com.rational.test.ft.domain.IChannel channel,
                               long handle)
    • Method Detail

      • getDescriptiveName

        public java.lang.String getDescriptiveName()
        Description copied from class: HtmlProxy
        Returns a name that can be used to describe the associated UI object in a script. This name may be further adjusted to be made unique to the script, but will act as the base for the name used in the script. Only characters used in Html identifiers should be returned (alphabetic, numeric or underscore characters). Non-identifier characters will cause script compilation failures. An example of what to return may be "OKButton" for a Html.BUTTON with the text "OK" on it.
        Overrides:
        getDescriptiveName in class InputProxy
        Returns:
        A descriptive object name.
      • getRole

        public java.lang.String getRole()
        Returns TestObjectRole.ROLE_BUTTON.
        Overrides:
        getRole in class HtmlProxy
        Returns:
        A brief type name that describes the role this object plays in the UI.
        Since:
        RFT1.0
      • getSubmitData

        public java.lang.String[] getSubmitData()
        Description copied from class: ControlProxy
        Return an array of String objects which contains Submit Data for the control. Submit Data consists of "name=value" pairs (CGI data).
        Overrides:
        getSubmitData in class InputProxy
      • getButtonVisibleText

        protected java.lang.String getButtonVisibleText()
      • getTestDataTypes

        public java.util.Hashtable getTestDataTypes()
        Returns a hashtable of data type descriptions of the verification point data available with the associated object in the SUT. The hashtable keys are String objects that are used as the VP type in the associated test data. The type is a simple value that is defferent then other type values associated with this object under test. The type keys map to a verbose description of the test data, reasonable for presentation to a user.
        Overrides:
        getTestDataTypes in class InputProxy
        Returns:
        An hashtable of type/description pairs used to describe the verification data available from this proxy.
        See Also:
        getTestData(String), ITestData
      • getTestData

        public com.rational.test.ft.vp.ITestData getTestData(java.lang.String testDataType)
        This method constructs the specified verification data object. The testDataType parameter is one of the hashtable keys returned by getTestDataTypes.
        Overrides:
        getTestData in class InputProxy
        Parameters:
        testDataType - A test data type supplied by getTestDataTypes.
        Returns:
        The verification data for the supplied type.
        See Also:
        getTestDataTypes(), ITestData
      • updateTestData

        public com.rational.test.ft.vp.ITestData updateTestData(java.lang.String testDataType,
                                                                com.rational.test.ft.vp.ITestData testData)
        This method updates the supplied test data object and returns it. The testDataType parameter is one of the hashtable keys returned by getTestDataTypes. The testData is a previously supplied ITestData object that needs to be updated to reflect the current state of the associated test object.
        Overrides:
        updateTestData in class InputProxy
        Parameters:
        testDataType - A test data type supplied by getTestDataTypes.
        testData - The test data base object that requires updating.
        Returns:
        The testData passed in with appropriate updates.
        See Also:
        getTestDataTypes(), ITestData
      • getActionArgs

        protected java.util.Vector getActionArgs(java.awt.Point point)
        Return null, pushbuttons don't have any interesting subitems and coordinates are way to fragile.
        Overrides:
        getActionArgs in class HtmlGuiProxy
        Parameters:
        point - point in screen coordinates
        Returns:
        a vector containing the appropriate subitem arguments.
      • getPropertyInternal

        public java.lang.Object getPropertyInternal(java.lang.String propertyName)
        Get the value for a specific property, internal use. Does not throw exceptions.
        Overrides:
        getPropertyInternal in class HtmlProxy
      • getDataDrivableCommand

        public com.rational.test.ft.sys.MethodSpecification getDataDrivableCommand()
        Description copied from class: HtmlProxy
        This method must be implemented by any proxy that wishes to support data driving. By default a null value is returned.
        Specified by:
        getDataDrivableCommand in interface com.rational.test.ft.domain.IDataDriven
        Overrides:
        getDataDrivableCommand in class InputProxy
        See Also:
        ProxyTestObject.getDataDrivableCommands(int)
      • getClearscriptSimpleName

        public java.lang.String getClearscriptSimpleName()
        Specified by:
        getClearscriptSimpleName in interface com.ibm.rational.test.ft.clearscript.IClearscript