View Javadoc

1   package br.com.caelum.seleniumdsl.table;
2   
3   import br.com.caelum.seleniumdsl.search.RowMatcher;
4   import br.com.caelum.seleniumdsl.search.RowVisitor;
5   import br.com.caelum.seleniumdsl.search.TableCriteria;
6   import br.com.caelum.seleniumdsl.table.layout.TableLayout;
7   
8   public interface Table {
9   
10  	public String getType();
11  
12  	/**
13  	 * @param columnIndex
14  	 *            the index of the column.
15  	 * @return the br.com.caelum.seleniumdsl.table.Column object
16  	 */
17  	public Column column(int columnIndex);
18  
19  	/**
20  	 * @param columnName
21  	 *            the label of the column.
22  	 * @return the br.com.caelum.seleniumdsl.Column object
23  	 */
24  	public Column column(String columnName);
25  
26  	public int getColCount();
27  
28  	public int getRowCount();
29  
30  	/**
31  	 * @return the number of rows of the contents, ignoring header and footer (if one is found)
32  	 */
33  	public int getContentCount();
34  
35  	/**
36  	 * @return the header br.com.caelum.seleniumdsl.table.Row object
37  	 */
38  	public Row header();
39  
40  	/**
41  	 * @param row
42  	 *            Only counts the CONTENTS of the table. So index 1 is the first data row of the table, ignoring the header.
43  	 * @return the br.com.caelum.seleniumdsl.table.Row object
44  	 */
45  	public Row row(Integer row);
46  
47  	/**
48  	 * @param row
49  	 *            Only counts the CONTENTS of the table. So index 1 is the first data row of the table, ignoring the header.
50  	 * @return the Cell object
51  	 */
52  	public Cell cell(int row, int col);
53  
54  	/**
55  	 * @param row
56  	 *            Only counts the CONTENTS of the table. So index 1 is the first data row of the table, ignoring the header.
57  	 * @return the Cell object
58  	 */
59  	public Cell cell(int row, String col);
60  
61  	/**
62  	 * @param col
63  	 *            the header text of the column
64  	 * @param content
65  	 *            the content to search
66  	 * @return true if the content exists
67  	 */
68  	public boolean contains(String col, String content);
69  
70  	public String getId();
71  
72  	public boolean exists();
73  
74  	public void iterate(RowVisitor visitor);
75  
76  	/**
77  	 * @param columnName
78  	 *            the header label of the column
79  	 * @return the column index
80  	 */
81  	public Integer findColumn(String columnName);
82  
83  	public RowMatcher select(RowMatcher matcher);
84  
85  	public TableCriteria createCriteria();
86  
87  	public TableLayout getLayout();
88  
89  }