public void FillStudentFormUsing_PageObjectRefactoringCustomSetMethod(string enterfirstname) { //more dinamic and custmize as compare to above method //here using method PageObjectRefactoringCustomSetMethod PageObjectRefactoringCustomSetMethod.EnterText(txtfirstname, enterfirstname); PageObjectRefactoringCustomSetMethod.Click(btnsubmit); }
public EAPageObject CreateStudent_PageObjectRefactoringCustomSetMethod(string firstName, string lastName, string enrollmentDate) { //here we r using the customizing the code by again reducing the parameter and pass by susing method PageObjectRefactoringCustomSetMethod.EnterText(enterFirstName, firstName); PageObjectRefactoringCustomSetMethod.EnterText(enterLastName, lastName); PageObjectRefactoringCustomSetMethod.EnterText(enterEnrollmentDate, enrollmentDate); PageObjectRefactoringCustomSetMethod.Click(btnCreate); return(new EAPageObject()); }