br.com.caelum.seleniumdsl.table.layout
Class PlainPlusThTableLayout

java.lang.Object
  extended by br.com.caelum.seleniumdsl.table.layout.PlainPlusThTableLayout
All Implemented Interfaces:
TableLayout

public class PlainPlusThTableLayout
extends Object
implements TableLayout


Constructor Summary
PlainPlusThTableLayout(com.thoughtworks.selenium.Selenium selenium, String id, String type)
           
 
Method Summary
 boolean contains(Table table, String col, String content)
           
 int getColCount()
           
 int getContentCount()
           
 int getRowCount()
           
 String headerLinkValue(int col)
          Used when the header's text is a link.
 String headerValue(int col)
           
 String value(int row, int col)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlainPlusThTableLayout

public PlainPlusThTableLayout(com.thoughtworks.selenium.Selenium selenium,
                              String id,
                              String type)
Method Detail

getContentCount

public int getContentCount()
Specified by:
getContentCount in interface TableLayout
Returns:
The tbody rows. Some layouts will remove the first row and return all the others, ignoring if the last row is a footer or no.

getColCount

public int getColCount()
Specified by:
getColCount in interface TableLayout
Returns:
The number of columns on the header.

headerValue

public String headerValue(int col)
Specified by:
headerValue in interface TableLayout
Parameters:
col - the column index
Returns:
the text of the column

headerLinkValue

public String headerLinkValue(int col)
Description copied from interface: TableLayout
Used when the header's text is a link. Common when doing pagination

Specified by:
headerLinkValue in interface TableLayout
Parameters:
col - the column index
Returns:
the '<a href' tag's text

value

public String value(int row,
                    int col)
Specified by:
value in interface TableLayout
Parameters:
row - the row index
col - the col index
Returns:
the text of the cell or null if the cell is not found

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface TableLayout
Returns:
The full row count, including possible header and footer.

contains

public boolean contains(Table table,
                        String col,
                        String content)
Specified by:
contains in interface TableLayout
col - the header text of the column
content - the content to search
Returns:
true if the content exists


Copyright © 2008. All Rights Reserved.