com.rational.test.ft.domain.html

Class TableDataCellProxy

  • 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 TableDataCellProxy
    extends HtmlGuiProxy
    Implements the proxy for Proxy for Html TH and TD table cell elements.
    • TestObject Interface: GuiTestObject

    • Supported Test Data Types:
      TypeDesciption
      text Visible Text ITestDataText

    • Default Recognition Properties:
      • .class
      • .classIndex
      • .text

    • Supported Canonical Properties:
      PropertyUsage
      .bounds A rectangle representing the bounding rectangle of the object in screen coordinates.
      .cellIndex The cell index of an element with respect to its row (0>=)
      .class This is the  test object class name, for example "HtmlTable" for a <Table> element.
      .id This is the value of the id attribute of an element.
      .name This is the value of the name attribute (Form elements and Frames only)
      .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.
      .rowIndex The row index of an element in a table (0>= ). 
      .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.

    Since:
    RFT1.0
    • Constructor Detail

      • TableDataCellProxy

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

      • shouldBeMapped

        public boolean shouldBeMapped()
        Description copied from class: HtmlProxy
        Returns false, by default only GUI test objects are mapped. If the generic Html element has an id or name (which probably indicates that it is used in a script) then return true, otherwise ignore it.
        Overrides:
        shouldBeMapped in class HtmlProxy
        Returns:
        true element has an id or name. false not a supported HTML object type
      • getSubitem

        public com.rational.test.ft.script.Subitem getSubitem(TableProxy callingTable)
        Returns the Cell object as the Subitem
        Parameters:
        callingTable - - the parent that called this method.
        Returns:
        The Cell object as the Subitem
      • equals

        public boolean equals(TableProxy table,
                              com.rational.test.ft.script.Subitem subitem)
        Compare Column object of the Cell object (subitem) to this cell's column identifying information, and return true if it matches.
        Parameters:
        table - - our current parent table.
        subitem - - subclass of subitem (Cell object which contains Row and Column objects)
        Returns:
        returns true if matches the Column part of the subitem.
      • isInView

        public boolean isInView()
        Is the object in view (for table cells - partially within the clipping rectangle)
        Overrides:
        isInView in class HtmlGuiProxy
      • getDefaultPointToClick

        protected java.awt.Point getDefaultPointToClick()
        Description copied from class: HtmlGuiProxy
        Determines the default click point by performing hit tests on candidates. This is required since a the point to click should always click on the object 1) Try the center. 2) try points along a diagonal from top left to bottom right.
        Overrides:
        getDefaultPointToClick in class HtmlGuiProxy