Beispiel #1
0
    def cells(self):
        """All cells of this table.

        :returns: A list of cells which are part of this table.
        :rtype: :py:class:`ftw.testbrowser.nodes.Nodes`
        """
        cells = Nodes()
        for row in self.rows:
            cells.extend(row.cells)
        return cells
Beispiel #2
0
    def get_rows(self, head=False, body=False, foot=False, head_offset=0):
        """Returns merged head, body or foot rows.
        Set the keyword arguments to ``True`` for selecting the type of rows.

        :param head: Selects head rows.
        :type head: boolean (Default: ``False``)
        :param body: Selects body rows.
        :type body: boolean (Default: ``False``)
        :param foot: Selects foot rows.
        :type foot: boolean (Default: ``False``)
        :param head_offset: Offset for the header for removing header rows.
        :type head_offset: int (Default: ``0``)
        :returns: A list of rows which are part of this table.
        :rtype: :py:class:`ftw.testbrowser.nodes.Nodes`
        """
        rows = Nodes()
        if head:
            rows.extend(self.head_rows[head_offset:])
        if body:
            rows.extend(self.body_rows)
        if foot:
            rows.extend(self.foot_rows)
        return rows