How do we implement LoadableComponent, when we have a fluent API, lets create a basic set of classes, shown below:
public class LoginPage {
// @FindBy locators
public DashboardPage login(String user, String pass) {
// something
}
}
public class DashboardPage {
// @FindBy locators
public UsersPage navigateToUsersPage() {
//navigate to users page
}
}
Now, we have a test maybe something like this:
@Test
public void coolTest() {
loginPage.open().login(“foo”, “bar”).navigateToUsersPage();
//assert something
}
Where does loadable component come into play here?
How can we ensure the page(s) are loaded, when they should be etc?
We aren’t explicitly calling open on 2 of the 3 pages used here.