com.rational.test.ft.domain.html

Class OptionProxy

  • 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


    public class OptionProxy
    extends SubobjectProxy
    Implements the proxy for HTML Option elements. This object does not represent a full fledged object, but a subobject of selected elements.
    • TestObject Interface: GuiTestObject

    • Supported Canonical Properties:
      PropertyUsage
      .bounds A rectangle representing the bounding rectangle of the object in screen coordinates.
      .class This is the  test object class name, for example "HtmlTable" for a <Table> element.
      .defaultSelected This is a boolean value that when true indicates that the Option element in a Select element (listbox or dropdown) is selected by default when the page is displayed.
      .id This is the value of the id attribute of an element.
      .index This is the index of the  OPTION element within a listbox or combodropdown list. 
      .offsetHeight The height of the element.
      .offsetLeft The offset of the element from its offset parent in the DOM.
      .offsetTop The offset of the element from its offset parent in the DOM.
      .offsetWidth The width  of the element.
      .selected This is a boolean value that indicates whether the Option element in a Select (Listbox or dropdown) is selected.
      .screenLeft Upper left corner of bounding rectangle in screen coordinates, x component.
      .screenTop Upper left corner of bounding rectangle in screen coordinates, y component.
      .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.
      .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
    • Constructor Detail

    • Method Detail

      • getScreenRectangle

        public java.awt.Rectangle getScreenRectangle()
        Specified by:
        getScreenRectangle in interface com.rational.test.ft.object.interfaces.IGraphical
        Overrides:
        getScreenRectangle in class HtmlGuiProxy
      • getClippingParent

        public com.rational.test.ft.object.interfaces.IGraphical getClippingParent()
        Description copied from class: HtmlGuiProxy
        Get the clipping parent for this object. The clipping parent is the object whose rectangle will clip all of its children, usually the browser or a frame. Unfortunately, it can also be a div tag in the object hierarchy, so going directly to the document does not worl
        Overrides:
        getClippingParent in class HtmlGuiProxy
      • isInView

        public boolean isInView()
        Description copied from class: HtmlGuiProxy
        Is the object in view (not clipped)?
        Overrides:
        isInView in class HtmlGuiProxy
      • select

        public void select(boolean select)
        select or deselect the Optin element.
        Parameters:
        select - - true then select the Option, false then deselect the option.
      • value

        public java.lang.String value()
        Retrieve the value attribute from the Option element.
        Returns:
        String - value of value attribute.
      • index

        public int index()
        Retrieve the index attribute from the Option element.
        Returns:
        int - index of this Option element
      • getLabel

        public java.lang.String getLabel()
      • getOptionValue

        public java.lang.String getOptionValue()
      • isSelected

        public boolean isSelected()
        Is this option element currently selected?
        Returns:
        true - selected
      • getSubitem

        public com.rational.test.ft.script.Subitem getSubitem()
        Description copied from class: SubobjectProxy
        Return a subitem object that identifies the subobject
        Specified by:
        getSubitem in class SubobjectProxy
      • equals

        public boolean equals(java.lang.Object other)
        compare the option element to the subitem, return true if it matches the value expressed by the subitem.
        Overrides:
        equals in class HtmlProxy
        Parameters:
        subitem - - subclass of subitem, currently supports Index, Text, and Value.
        Returns:
        true - matches subitem.
      • isSupported

        public static boolean isSupported(com.rational.test.ft.script.Subitem subitem)
      • isPointInObject

        public boolean isPointInObject(java.awt.Point point)
        Specified by:
        isPointInObject in interface com.rational.test.ft.object.interfaces.IGraphical
        Overrides:
        isPointInObject in class HtmlGuiProxy
      • equals

        public boolean equals(com.rational.test.ft.script.Subitem subitem,
                              java.lang.String label)
        This method is used to compare the subitem along with the option group.
        Parameters:
        subitem -
        label -
        Returns:
      • getMyIndex

        public int getMyIndex()
      • setMyIndex

        public void setMyIndex(int index)