Package co.verisoft.fw.utils.locators
Class TdBy
- java.lang.Object
-
- co.verisoft.fw.utils.locators.TdBy
-
public final class TdBy extends Object
A set of methods to be used when looking for fields value in a table. This mechanism used to locate elements within a document using a single lookup. It converts row number and column number into search objects and returns
Byobject with results.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.openqa.selenium.BycellLocation(int rowNumber, int columnNumber)Looks for a cell value with rowNumber and columnNumber.static org.openqa.selenium.BytableHeader(int columnNumber)Looks for a header valuewith a specific columnNumber.
-
-
-
Method Detail
-
cellLocation
public static org.openqa.selenium.By cellLocation(int rowNumber, int columnNumber)Looks for a cell value with rowNumber and columnNumber.
For example:
with the following table:
Month Savings Sum $180 January $100 February $80
The codeWebElement element = driver.findElement(TdBy.cellLocation(1,0));
will return the value "January"- Parameters:
rowNumber- row number to look for. First row is 0columnNumber- col number to look for. First col is 0- Returns:
object with the locators ready in itBy
-
tableHeader
public static org.openqa.selenium.By tableHeader(int columnNumber)
Looks for a header valuewith a specific columnNumber.
For example:
with the following table:
The codeMonth Savings Sum $180 January $100 February $80 WebElement element = driver.findElement(TdBy.tableHeader(0));
will return the value "Month"- Parameters:
columnNumber- col number to look for. First col is 0.- Returns:
object with the locators ready in itBy
-
-