public void PopulatePageAndSubmit()
 {
     FirstName.SendKeys("Miller");
     LastName.SendKeys("John");
     UserEmail.SendKeys("*****@*****.**");
     Gender.Click();
     MobileNumber.SendKeys("0751123456");
     DateOfBirth.Click();
     Month.Click();
     Year.Click();
     Day.Click();
     Subjects.SendKeys("Test subjects");
     Thread.Sleep(2000);
     Hobbies.Click();
     ((IJavaScriptExecutor)_driver).ExecuteScript("arguments[0].scrollIntoView(true);", Picture);
     //Thread.Sleep(5000);
     //Picture.Click();
     CurrentAddress.SendKeys("Str. 13 Dec");
     Thread.Sleep(2000);
     StateDropDown.Click();
     StateOption.Click();
     CityDropDown.Click();
     CityOption.Click();
     Submit.Click();
 }
Ejemplo n.º 2
0
 public void FillForm(Models user)
 {
     Form[1].Click();
     FormBtn[1].Click();
     FirstName.SendKeys(user.FirstName);
     LastName.SendKeys(user.LastName);
     UserEmail.SendKeys(user.UserEmail);
     RadioCheckbox[0].Click();
     UserNumber.SendKeys(user.UserNumber);
     DateOfBirth.Click();
     SelectJune.Click();
     SelectYear.Click();
     SelectDate[0].Click();
     //for (int i = 0; i < 11; i++)
     //{
     //    formPage.Subjects.SendKeys(Keys.Backspace);
     //}
     //formPage.DateOfBirth.SendKeys("01 02 1982");
     //formPage.DateOfBirth.SendKeys(Keys.Escape);
     Subjects.Click();
     Subjects.SendKeys(user.Subjects);
     RadioCheckbox[3].Click();
     Submit.Click();
 }