//method to click register and launch register page public RegisterPage Register() { BtnRegister.Click(); //return a new instance of RegisterPage() return(new RegisterPage()); }
public void Register(string email, string password, string fullname, string age) { TxtEmail.SendKeys(email); TxtPassword.SendKeys(password); TxtFullname.SendKeys(fullname); TxtAge.SendKeys(age); BtnRegister.Click(); }
public RegisterPage RegisterInvalid(string email, string password, string confirm, string pid) { //input data TxtEmail.Clear(); TxtEmail.SendKeys(email); TxtPassword.Clear(); TxtPassword.SendKeys(password); TxtConfirmPassword.Clear(); TxtConfirmPassword.SendKeys(confirm); TxtPIDPassport.Clear(); TxtPIDPassport.SendKeys(pid); //submit BtnRegister.Click(); //return thank you page return(this); }
public RegisterPage RegisterInvalid(User user) { //input data TxtEmail.Clear(); TxtEmail.SendKeys(user.Email); TxtPassword.Clear(); TxtPassword.SendKeys(user.Password); TxtConfirmPassword.Clear(); TxtConfirmPassword.SendKeys(user.PasswordConfirm); TxtPIDPassport.Clear(); TxtPIDPassport.SendKeys(user.Pid); //submit BtnRegister.Click(); //return error page return(this); }
public ThankYouRegisterPage Register(User user) { //input data TxtEmail.Clear(); TxtEmail.SendKeys(user.Email); TxtPassword.Clear(); TxtPassword.SendKeys(user.Password); TxtConfirmPassword.Clear(); TxtConfirmPassword.SendKeys(user.PasswordConfirm); TxtPIDPassport.Clear(); TxtPIDPassport.SendKeys(user.Pid); //submit BtnRegister.Click(); //return thank you page return(new ThankYouRegisterPage()); }
//method to fill register form public IWebElement Register(string fname, string lname, int date, string month, int year, string email, string passwrd) { TxtFirstName.SendKeys(fname); TxtLastName.SendKeys(lname); SelectDay.SendKeys(date.ToString()); SelectMonth.SendKeys(month); SelectYear.SendKeys(year.ToString()); TxtEmail.SendKeys(email); TxtPasswrd.SendKeys(passwrd); TxtConfirmPasswrd.SendKeys(passwrd); BtnRegister.Click(); Console.WriteLine("Registering using MyAccountPage.Register"); try { BtnContinue = PropertiesCollection.Driver.FindElement(By.Name("register-continue")); } catch (OpenQA.Selenium.NoSuchElementException) { BtnContinue = null; } Console.WriteLine(BtnContinue); return(BtnContinue); }