Exemplo n.º 1
0
        //method to click register and launch register page
        public RegisterPage Register()
        {
            BtnRegister.Click();

            //return a new instance of RegisterPage()
            return(new RegisterPage());
        }
 private void TxtEmailAddress_OnKeyDown(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == VirtualKey.Enter)
     {
         BtnRegister.Focus(FocusState.Programmatic);
         e.Handled = true;
     }
 }
Exemplo n.º 3
0
 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();
 }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
        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());
        }
Exemplo n.º 7
0
 //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);
 }