com.rational.test.ft.domain.html

Class InputProxy

  • All Implemented Interfaces:
    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
    Direct Known Subclasses:
    CheckboxProxy, EditboxProxy, PushbuttonProxy


    public class InputProxy
    extends ControlProxy
    Implements the proxy for HTML INPUT elements
    • TestObject Interface: GuiTestObject

    • 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.
      .bounds A rectangle representing the bounding rectangle of the object in screen coordinates.
      .checked This is a boolean value indicating whether a checkboxed is currently checked (true) or not (false).
      .class This is the  test object class name, for example "HtmlTable" for a <Table> element.
      .className This the value of the class attribute of an element
      .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.
      .hasScript This value is returned as a boolean.  If true then script as been associated with actions on this element.
      .id This 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.
      .name This is the value of the name attribute (Form elements and Frames only)
      .readOnly The value of the readonly attribute of an element.  A boolean value that  when true indicates the form element is read only.
      .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.
      .tag This is the Html tag for the element
      .text This 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.
      .title This 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.
      .value This 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
    • 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 HtmlProxy
        Returns:
        A descriptive object name.
      • 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 ControlProxy
      • 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 HtmlProxy
        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 HtmlProxy
        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 HtmlProxy
        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
      • isEnabled

        public boolean isEnabled()
        This method returns if user input is currently enabled for the element
        Specified by:
        isEnabled in interface com.rational.test.ft.object.interfaces.IGraphical
        Overrides:
        isEnabled in class ControlProxy
        Returns:
        Boolean: if true, input is enabled
      • isReadOnly

        public boolean isReadOnly()
      • setProperty

        public void setProperty(java.lang.String propertyName,
                                java.lang.Object value)
        Description copied from class: HtmlProxy
        Set the value for a specific property.
        Overrides:
        setProperty 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 HtmlProxy
        See Also:
        ProxyTestObject.getDataDrivableCommands(int)