Skip to content

Instantly share code, notes, and snippets.

@borodicht
Created December 3, 2024 06:49
Show Gist options
  • Save borodicht/14d0509f306dbe5f89f8ba13556beab1 to your computer and use it in GitHub Desktop.
Save borodicht/14d0509f306dbe5f89f8ba13556beab1 to your computer and use it in GitHub Desktop.
package steps;
import dto.Account;
import io.qameta.allure.Step;
import org.openqa.selenium.WebDriver;
import pages.AccountsPage;
import pages.HomePage;
import pages.NewAccountModal;
public class AccountStep {
HomePage homePage;
AccountsPage accountsPage;
NewAccountModal newAccountModal;
public AccountStep (WebDriver driver) {
homePage = new HomePage(driver);
accountsPage = new AccountsPage(driver);
newAccountModal = new NewAccountModal(driver);
}
@Step()
public void create(Account account) {
homePage.selectMenuOption("Account");
accountsPage.clickOnActionButton("New");
newAccountModal.createAccount(account);
newAccountModal.clickButton("Save");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment