1. @At("#HOST/bank/accounts.html")
  2. public class AccountsPage extends PageObject {
  3. @FindBy(id = "user")
  4. private WebElement userField;
  5. @FindBy(id = "ammount")
  6. private WebElement amountField;
  7. public AccountsPage(WebDriver driver) {
  8. super(driver);
  9. }
  10. public void enterUserName(String userName)
  11. {
  12. enter(userName).into(userField);
  13. }
  14. public void enterAmount(double amount)
  15. {
  16. waitUntilAmountIsEnabled();
  17. enter(Double.toString(amount)).into(amountField);
  18. }
  19. public void waitUntilAmountIsEnabled()
  20. {
  21. element(amountField).isEnabled();
  22. }
Comments powered by Disqus