public TestBlankFormPage FillLastName(string name) { CustomTestContext.WriteLine($"Fill last name - '{name}'"); LastNameInput.SendKeys(name); return(this); }
public void FillForm(bool beachOnly, string lastName, string emailAddress, string skills) { if (beachOnly) { BeachOnlyDropDown.SelectByText("Yes"); } else { BeachOnlyDropDown.SelectByText("No"); } Thread.Sleep(_delay); LastNameInput.ClearSlowy(_delay); if (!string.IsNullOrWhiteSpace(lastName)) { LastNameInput.SendKeysSlowly(_delay, lastName); } EmailAddressInput.ClearSlowy(_delay); if (!string.IsNullOrWhiteSpace(emailAddress)) { EmailAddressInput.SendKeysSlowly(_delay, emailAddress); } SkillsInput.ClearSlowy(_delay); SkillsInput.SendKeysSlowly(_delay, skills); }
public AddressFormComponent TypeInLastNameInput(string text) { LastNameInput.Click(); LastNameInput.Clear(); LastNameInput.SendKeys(text); return(this); }
private void Reset() { FirstNameInput.ResetText(); LastNameInput.ResetText(); PatronymicInput.ResetText(); AmountInput.Value = AmountInput.Minimum; DateInput.Value = DateTime.Now; TimeInput.Value = DateTime.Now; PayedInput.Checked = false; }
private void AddRow_Click(object sender, EventArgs e) { EmployeePayroll employeePayRoll = new EmployeePayroll(); employeePayRoll.EmployeeFirstName = FirstNameInput.Text; employeePayRoll.EmployeeLastName = LastNameInput.Text; employeePayRoll.EmployeeEmail = EmailInput.Text; double PayRate = 0; double.TryParse(PayRateInput.Text, out PayRate); employeePayRoll.EmployeePayRate = PayRate; double Quantity = 0; double.TryParse(QtyInput.Text, out Quantity); employeePayRoll.TaskQty = Quantity; double ExtraPay = 0; double.TryParse(ExtraInput.Text, out ExtraPay); employeePayRoll.EmployeeExtraPay = ExtraPay; double TotalPay = 0; double.TryParse(TotalPayInput.Text, out TotalPay); employeePayRoll.EmployeeTotalPay = TotalPay; employeePayRoll.EmployeeComments = CommentsInput.Text; // Display the new information in the grid from the field. dataGridView1.Rows.Add(FirstNameInput.Text, LastNameInput.Text, EmailInput.Text, PayRate, Quantity, ExtraPay, TotalPay, CommentsInput.Text); dataGridView1.Columns[0].DisplayIndex = 0; // Clear out the input fields FirstNameInput.Clear(); LastNameInput.Clear(); EmailInput.Clear(); PayRateInput.Clear(); QtyInput.Clear(); ExtraInput.Clear(); TotalPayInput.Clear(); CommentsInput.Clear(); }
private void EditEmployeeOKButton_Click(jQueryEvent evt) { string firstName = FirstNameInput.Value.Trim(), lastName = LastNameInput.Value.Trim(), title = TitleInput.Value.Trim(), email = EmailInput.Value.Trim(); if (firstName == "") { Window.Alert("You must enter a first name."); FirstNameInput.Focus(); return; } if (lastName == "") { Window.Alert("You must enter a last name."); LastNameInput.Focus(); return; } if (title == "") { title = null; } if (email == "") { Window.Alert("You must enter an email address."); EmailInput.Focus(); return; } bool add = (EmployeesGrid.GetData(EmployeesGrid.SelectedRowIndex) == null); Employee emp = new Employee(firstName, lastName, title, email); EmployeesGrid.UpdateItem(EmployeesGrid.SelectedRowIndex, GetGridTexts(emp), emp); if (add) { EmployeesGrid.AddItem(GetGridTexts(null), null); } Tree.SetTreeNodeData(DepartmentsTree.SelectedNode, GetCurrentEmployees()); EditEmployeeDialog.Close(); }
public void InsertLastName(string lastName) { LastNameInput.SendKeys(lastName); LastNameInput.SendKeys(Keys.Enter); }
public AddressFormComponent ClickLastNameInput() { LastNameInput.Click(); return(this); }