コード例 #1
0
 public RegistrationPage FillAndSubmitRegistrationForm(string login, string email, string name, string surname, string phone, string password, string confirmPassword)
 {
     LoginField.SendKeys(login);
     EmailField.SendKeys(email);
     NameField.SendKeys(name);
     SurnameField.SendKeys(surname);
     PhoneField.SendKeys(phone);
     PasswordField.SendKeys(password);
     RepeatPasswordField.SendKeys(confirmPassword);
     TestDataHelper.ClickRandomDate(BirthDateField);
     UnitField.Click();
     EridCells = Factory.TryFindElements(By.XPath(RegistrationPageLocators.GridCellsLocator));
     TestDataHelper.ClickRandomGridCell(EridCells);
     ConfirmationButton.Click();
     return(new RegistrationPage());
 }
コード例 #2
0
ファイル: LoginPage.cs プロジェクト: sgundeboina/Selenium
        public string FillLoginForm(string username, string password, string repeatPassword)
        {
            UsernameField.Clear();
            UsernameField.SendKeys(username);
            PasswordField.Clear();
            PasswordField.SendKeys(password);
            RepeatPasswordField.Clear();
            RepeatPasswordField.SendKeys(repeatPassword);
            LoginButton.Click();

            var appAlert = _driver.SwitchTo().Alert();

            var tempstr = appAlert.Text;

            appAlert.Accept();
            return(tempstr);
        }
コード例 #3
0
 public RegistrationPage aa(string birthDate, params string[] vs)
 {
     foreach (var item in vs)
     {
         LoginField.SendKeys(item);
         EmailField.SendKeys(item);
         NameField.SendKeys(item);
         SurnameField.SendKeys(item);
         PhoneField.SendKeys(item);
         PasswordField.SendKeys(item);
         RepeatPasswordField.SendKeys(item);
     }
     TestDataHelper.ClickRandomDate(BirthDateField);
     UnitField.Click();
     EridCells = Factory.TryFindElements(By.XPath(RegistrationPageLocators.GridCellsLocator));
     TestDataHelper.ClickRandomGridCell(EridCells);
     ConfirmationButton.Click();
     return(new RegistrationPage());
 }