Ejemplo n.º 1
0
 //method to login
 public void Login(string email, string passwrd)
 {
     TxtEmail.SendKeys(email);
     TxtPasswrd.SendKeys(passwrd);
     BtnLogIn.Click();
     //return new WelcomePage();
 }
Ejemplo n.º 2
0
 public StorePage Login(string email, string password)
 {
     Console.WriteLine("Debug: Inside Login()");
     Console.WriteLine("Debug" + TxtEmail);
     TxtEmail.SendKeys(email);
     Console.WriteLine("Sending email to login");
     TxtPasswrd.SendKeys(password);
     BtnLogin.Click();
     return(new StorePage());
 }
Ejemplo n.º 3
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);
 }