June 2017
Intermediate to advanced
256 pages
5h 38m
English
The second approach is having assertions in the test suite. In this case, we will have a Page Object that implements a getter for the element state we want to have a check on or verify upon. So in this case, we need a method in the page class that will return us the text of the search result header.
Let's implement the page class for this:
package pages;import io.appium.java_client.AppiumDriver;import org.openqa.selenium.WebElement;import org.openqa.selenium.support.FindBy;import org.openqa.selenium.support.PageFactory;import java.util.List;public class CarResultsPage extends BasePage { AppiumDriver appiumDriver; @FindBy(id = "category") private WebElement categoryChooser; @FindBy(id = "inspected_checkbox" ...
Read now
Unlock full access