示例#1
0
 private void UpdateSelectedFrame(int x)
 {
     this._runButton.IsActiveSelectedFrame    = x == 0;
     this._cancelButton.IsActiveSelectedFrame = x == 1;
     if (x == 0)
     {
         this._selectedButton = this._runButton;
     }
     else
     {
         this._selectedButton = this._cancelButton;
     }
 }
 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());
 }
 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());
 }
示例#4
0
        internal ConfirmationForm(string formName)
        {
            BackColor       = Color.FromArgb(5, 113, 176);
            Name            = formName;
            Size            = new Size(550, 150);
            FormBorderStyle = FormBorderStyle.None;
            StartPosition   = FormStartPosition.CenterScreen;
            menuOKButton    = new ConfirmationButton("OK", Size.Width / 5 * 2, Size.Height / 3 * 2, Size.Width / 5,
                                                     Size.Height / 4);
            menuOKButton.Click += MenuOKButton_Click;
            Controls.Add(menuOKButton);
            confirmationButtonLabel = new PopoutMenuLabel(Size.Width, Size.Height - Size.Height / 5,
                                                          "confirmationButtonLabel",
                                                          "You must enter all the required information");

            if (Name == "dateTimeConfirmation")
            {
                confirmationButtonLabel = new PopoutMenuLabel(Size.Width, Size.Height - Size.Height / 5,
                                                              "dateTimeConfirmationButtonLabel", "Tasks must be set further than 5 hours out");
            }
            Controls.Add(confirmationButtonLabel);
        }