1 package br.com.caelum.seleniumdsl.table;
2
3 import com.thoughtworks.selenium.Selenium;
4
5 public class DefaultRow implements Row {
6
7 private final Table table;
8 private final Selenium selenium;
9 private final int index;
10
11 public DefaultRow(Table table, Selenium selenium, int index) {
12 this.table = table;
13 this.selenium = selenium;
14 this.index = index;
15 }
16
17 public Cell cell(int column) {
18 return new DefaultCell(selenium, table, index, column);
19 }
20
21 public Cell cell(String column) {
22 int columnNumber = table.findColumn(column);
23 return new DefaultCell(selenium, table, index, columnNumber);
24 }
25
26 public Integer index() {
27 return index;
28 }
29 }