Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Usage example of a Data Factory in a test
@Test
void submitValidLoan() {
Loan validLoanData = LoanDataFactory.createLoan();
LoanPage loanPage = new LoanPage();
loanPage.fillName(validLoanData.getName());
loanPage.fillEmail(validLoanData.getEmail());
loanPage.fillAmount(validLoanData.getAmount());
loanPage.fillInstallments(validLoanData.getInstallments());
loanPage.clickOnSubmit();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment