public class PageSteps
extends java.lang.Object
| Constructor and Description | 
|---|
PageSteps()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
acceptAlert()
Closes the alert message. 
 | 
void | 
clickOnText(java.lang.String message)
Perform click on some specific label. 
 | 
void | 
navigateToPage(java.lang.String name)
Navigates to some specific page. 
 | 
void | 
pageContainsData(cucumber.api.DataTable data)
Verifies that page contains some data. 
 | 
void | 
populatePageWithData(cucumber.api.DataTable data)
Populates current page with the data provided. 
 | 
void | 
verifyCurrentPage(java.lang.String name)
Verified that the page specified by the name is current. 
 | 
void | 
verifyMultipleLabelsAvailability(java.util.List<java.lang.String> elements)
Verifies multiple labels presence. 
 | 
void | 
verifyTextPresent(java.lang.String text)
Verifies whether some text is shown on screen. 
 | 
@Given(value="^I am on the \"(.*)\" (?:page|screen)$")
 @When(value="^(?:I |)go to the \"(.*)\" (?:page|screen)$")
public void navigateToPage(java.lang.String name)
                                                                                                                                       throws java.lang.Exception
Page.navigate() method
 for specific page.name - the name of the page to navigate to.java.lang.Exception - any exception related to data conversion or null value@Then(value="^I should see the \"(.*)\" (?:page|screen)$")
public void verifyCurrentPage(java.lang.String name)
                                                                                  throws java.lang.Exception
Page#isCurrent() method call.name - the page name.java.lang.Exception - any exception related to data conversion or null value.@When(value="^(?:I |)accept the alert message$") public void acceptAlert()
@Then(value="^(?:I should see |)the \"(.*)\" (?:text|label) is shown$") public void verifyTextPresent(java.lang.String text)
text - the text to check.@Then(value="^(?:I should see |)the following labels are shown:$") public void verifyMultipleLabelsAvailability(java.util.List<java.lang.String> elements)
elements - the list of labels to check presence of.@When(value="^(?:I |)populate current page with the following data:$")
public void populatePageWithData(cucumber.api.DataTable data)
                                                                                                 throws java.lang.Exception
Edit#setText(String) method implemented.data - the table containing field to fill and value.java.lang.Exception - either reflection problems (like access) or missing attributes.@Then(value="^(?:I should see |)the page contains the following data:$")
public void pageContainsData(cucumber.api.DataTable data)
                                                                                               throws java.lang.Exception
data - the data table containing fields and expected values.java.lang.Exception - either reflection problems (like access) or missing attributes.@When(value="^(?:I |)click on the \"([^\"]*)\" (?:text|label)$") public void clickOnText(java.lang.String message)
message - the text of the label to click on.