public class ControlSteps
extends java.lang.Object
| Constructor and Description |
|---|
ControlSteps() |
| Modifier and Type | Method and Description |
|---|---|
void |
atLeastOneElementIsShown(java.util.List<java.lang.String> elements)
Checks whether at least one of the elements is available.
|
void |
clickOnTheButton(java.lang.String name)
Performs the click on the element specified by name on current page.
|
void |
enterValue(java.lang.String text,
java.lang.String fieldName)
Enters the text into the text field specified by name.
|
void |
fieldValueIsCalculatedByFormula(java.lang.String field,
java.lang.String formula)
Calculates formula and compares value with the value of specific field.
|
void |
noteControlTextAs(java.lang.String field,
java.lang.String varName)
Stores the field value in the context variable.
|
void |
noteTheFollowingFields(cucumber.api.DataTable criteria)
Stores multiple fields in multiple variables.
|
Control |
verifyElementExists(java.lang.String fieldName)
Verifies if element specified by name exists on current page.
|
void |
verifyElementsWithVisibility(cucumber.api.DataTable criteria)
Checks multiple state of multiple elements.
|
void |
verifyFieldText(java.lang.String fieldName,
java.lang.String text)
Verifies that the field specified by the name contains some specific text.
|
void |
verifyMultipleFieldsAvailability(java.util.List<java.lang.String> elements)
Verifies that all elements listed in parameters table are available on the page.
|
@When(value="^(?:I |)(?:click|tap) on the \"(.*)\" (?:button|element|control)$")
public void clickOnTheButton(java.lang.String name)
throws java.lang.Exception
name - the element name to click on.java.lang.Exception - either reflection problems (like access) or missing attributes.@Then(value="^(?:I should see |)the \"(.*)\" field is available$") public Control verifyElementExists(java.lang.String fieldName) throws java.lang.Exception
fieldName - the name of the field to check existence of.java.lang.Exception - either reflection problems (like access) or missing attributes.@When(value="^(?:I |)enter \"(.*)\" text into the \"(.*)\" field$")
public void enterValue(java.lang.String text,
java.lang.String fieldName)
throws java.lang.Exception
text - text to enter.fieldName - the name of the field.java.lang.Exception - either reflection problems (like access) or missing attributes.@Then(value="^(?:I should see |)the \"(.*)\" field contains the \"(.*)\" text$")
public void verifyFieldText(java.lang.String fieldName,
java.lang.String text)
throws java.lang.Exception
fieldName - the name of the field to check the text of.text - the expected part of the text.java.lang.Exception - either reflection problems (like access) or missing attributes.@Then(value="^(?:I should see |)the following fields are shown:$")
public void verifyMultipleFieldsAvailability(java.util.List<java.lang.String> elements)
throws java.lang.Exception
elements - the list of elements to check.java.lang.Exception - either reflection problems (like access) or missing attributes.@Then(value="^(?:I should see |)the (?:elements|buttons|controls) with the following properties:$")
public void verifyElementsWithVisibility(cucumber.api.DataTable criteria)
throws java.lang.Throwable
criteria - the data table showing multiple fields criteria.java.lang.Throwable - either reflection problems (like access) or missing attributes.@Then(value="^(?:I should see |)at least one of the following elements is shown:$")
public void atLeastOneElementIsShown(java.util.List<java.lang.String> elements)
throws java.lang.Exception
elements - the list of elements to check availability for.java.lang.Exception - either reflection problems (like access) or missing attributes.@When(value="^(?:I |)note the \"(.*)\" field text as \"(.*)\"")
public void noteControlTextAs(java.lang.String field,
java.lang.String varName)
throws java.lang.Exception
field - the name of the field to get value from.varName - variable name to store field value to.java.lang.Exception - either reflection problems (like access) or missing attributes.@When(value="^(?:I |)note following fields values:$")
public void noteTheFollowingFields(cucumber.api.DataTable criteria)
throws java.lang.Exception
criteria - the data table containing field names and variable names.java.lang.Exception - either reflection problems (like access) or missing attributes.@Then(value="^(?:I should see |)the \"(.*?)\" field value is calculated using the following formula:$")
public void fieldValueIsCalculatedByFormula(java.lang.String field,
java.lang.String formula)
throws java.lang.Throwable
field - the name of the field to compare data with.formula - the formula to calculate expected value.java.lang.Throwable - either reflection problems (like access) or missing attributes.