public class TableSteps
extends java.lang.Object
| Constructor and Description |
|---|
TableSteps() |
| Modifier and Type | Method and Description |
|---|---|
void |
clickOnSubItem(java.lang.String firstLast,
java.lang.String item,
java.lang.String list)
Clicks on specific sub-item at the first/last row of the table specified by name.
|
void |
noteRowCountAs(java.lang.String list,
java.lang.String varName)
Stores the table row count in the context variable.
|
void |
verifyListEmptyState(java.lang.String list,
java.lang.String emptyState)
Verifies whether table is empty or not.
|
void |
verifyListRowData(java.lang.String firstLast,
java.lang.String list,
cucumber.api.DataTable data)
Checks the values of first or last row of the table.
|
void |
verifyTableRowCount(java.lang.String list,
java.lang.String countValue)
Compares expected and actual row counts for the table specified by name.
|
@Then(value="^(?:I should see |)the \"(.*)\" (?:list|table) is (|not )empty$")
public void verifyListEmptyState(java.lang.String list,
java.lang.String emptyState)
throws java.lang.Exception
list - the name of the table to check.emptyState - the fragment flagging whether we expect empty or non-empty state.java.lang.Exception - either reflection problems (like access) or missing attributes.@Then(value="^(?:I should see |)the (first|last) (?:row|item) of the \"(.*)\" (?:list|table) contains the following data:$")
public void verifyListRowData(java.lang.String firstLast,
java.lang.String list,
cucumber.api.DataTable data)
throws java.lang.Throwable
firstLast - switch indicating whether we check first or last item.list - the name of the table element.data - the data table containing pairs of sub-item name and expected value.java.lang.Throwable - either reflection problems (like access) or missing attributes.@When(value="^(?:I |)(?:click|tap) on the (first|last) \"(.*)\" element of the \"(.*)\" (?:list|table)$")
public void clickOnSubItem(java.lang.String firstLast,
java.lang.String item,
java.lang.String list)
throws java.lang.Exception
firstLast - switch indicating whether we check first or last item.item - the sub-item name.list - the name of the table element.java.lang.Exception - either reflection problems (like access) or missing attributes.@When(value="^(?:I |)note the \"(.*)\" (?:table|list) (?:row|item) count as \"(.*)\"")
public void noteRowCountAs(java.lang.String list,
java.lang.String varName)
throws java.lang.Exception
list - the name of the data table.varName - the name of context variable to store value in.java.lang.Exception - either reflection problems (like access) or missing attributes.@Then(value="^(?:I should see |)the \"(.*)\" (?:table|list) has \"(.*)\" (?:items|rows)$")
public void verifyTableRowCount(java.lang.String list,
java.lang.String countValue)
throws java.lang.Exception
list - the name of the table.countValue - expected count.java.lang.Exception - either reflection problems (like access) or missing attributes.