public MainPage() { InitializeComponent(); email.Text = ""; pass.Text = ""; UserEmail.Clear(); UserName.Clear(); }
public void UserLogin(string email, string password) { WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(30)); wait.Until(ExpectedConditions.ElementToBeClickable(_typeEmail)); UserEmail.Clear(); UserEmail.SendKeys(email); Thread.Sleep(2000); wait.Until(ExpectedConditions.ElementToBeClickable(_typePassword)); UserPassword.Clear(); UserPassword.SendKeys(password); }
}//end load user list /// <summary> /// this method populates the user information based on the selected user /// </summary> /// <param name="sender">send object</param> /// <param name="e">arguments</param> private void UserList_SelectedIndexChanged(object sender, EventArgs e) { User selectedUser = (User)UserList.SelectedValue; if (selectedUser.UserID != 0) { UserID.Enabled = true; UserID.Text = selectedUser.UserID.ToString(); UserName.Text = selectedUser.UserName; UserEmail.Text = selectedUser.UserEmail; UserPhoneNum.Text = selectedUser.UserTel; } else { UserID.Enabled = false; UserID.Text = selectedUser.UserID.ToString(); UserName.Clear(); UserEmail.Clear(); UserPhoneNum.Clear(); } }//end UserList_SelectedIndexChanged