com.rational.test.ft.domain.html

Class TableRowProxy

  • 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 TableRowProxy
    extends HtmlGuiProxy
    Implements the Proxy for HTML TR 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.
      .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

    • 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
      • equals

        public boolean equals(TableProxy callingTable,
                              com.rational.test.ft.script.Subitem subitem,
                              TableDataCellProxy cell)
        Compare Row object of the Cell object (subitem) to this row's identifying information, and return true if it matches.
        Parameters:
        callingTable - - the parent that called this method.
        subitem - - subclass of subitem (Cell object which contains Row and Column objects)
        Returns:
        true - matches the Row part of the subitem.
      • getDataCellAtPoint

        protected TableDataCellProxy getDataCellAtPoint(TableProxy callingTable,
                                                        java.awt.Point pt)
        Get the TableDataCellProxy object in this row (proxy for TH and TD HTML table cell elements) identified by the specified screen point.
        Parameters:
        callingTable - - the parent that called this method.
        pt - The screen point at which to look for a TH or TD element.
        Returns:
        Returns the TableDataCellProxy object, which is identified by the Subitem, if not found null is returned.
      • buildHeaderList

        protected int buildHeaderList(TableProxy callingTable)
        Builds column and row header lists for the entire table (used during playback when no column or row header exists). The cells of the row are enumerated (TH and TD HTML elements) looking for TH elements which identify a column or row header.
        Parameters:
        callingTable - - the parent that called this method.
        Returns:
        The number of cells in this row.
      • buildHeaderList

        protected int buildHeaderList(TableProxy callingTable,
                                      boolean isForCSLabelGeneration)
        Builds column and row header lists for the entire table (used during playback when no column or row header exists). The cells of the row are enumerated (TH and TD HTML elements) looking for TH elements which identify a column or row header.
        Parameters:
        callingTable - - the parent that called this method.
        Returns:
        The number of cells in this row.
      • setHeader

        protected void setHeader(TableProxy callingTable,
                                 TableDataCellProxy cell,
                                 boolean isForCSLabel)
        Determines if cell represents a header. If so, the the dataCell visible text is stored in the callingTable in the row or column header list.
        Parameters:
        callingTable - - the parent that called this method
        rowIndex - - the index of this row
        dataCell - - a TableDataCellProxy object within this row
      • getDataCell

        protected TableDataCellProxy getDataCell(TableProxy callingTable,
                                                 com.rational.test.ft.script.Subitem subitem)
        Get the TableDataCellProxy object in this row (proxy for TH and TD HTML table cell elements) identified by the specified subitem (Cell object).
        Parameters:
        callingTable - - the parent that called this method.
        subitem - - Subitem object (Cell object which contains Row and Column objects)
        Returns:
        Returns the TableDataCellProxy object, which is identified by the Subitem, if not found null is returned.
      • getRowObjectsArray

        protected TableDataCellProxy[] getRowObjectsArray()
        Get the TableDataCellProxy array for this row.
        Returns:
        Returns an array of TableDataCellProxy objects for this row.