public void CheckInvalidLogin(string username, string password) { UsernameField.SendKeys(username); PasswordField.SendKeys(password); FailedBtnSignIn.Click(false); ErrorLoginMessage.WaitForElementVisibleAndEnabled(); }
public void Login(String username, String password) { bool isLoggedIn = false; while (!isLoggedIn) { if (!isLoggingIn) { try { isLoggingIn = true; Thread.Sleep(1000); UsernameField.SendKeys(username); PasswordField.SendKeys(password); LoginButton.Click(); if (Driver.WebDriver.PageSource.Contains("CAS Authentication failed!")) { CasAuthFailRedirect.Click(); } isLoggedIn = true; } catch (Exception e) { } finally { isLoggingIn = false; } } else { Thread.Sleep(new Random().Next(1, 99) * 100); } } }
public void Register(string planType) { var d = new Data.AccountInfo(); EmailField.SendKeys(planType + d.Email); EmailConfirmField.SendKeys(planType + d.Email); UsernameField.SendKeys(planType + d.username); PasswordField.SendKeys(d.Password); ConfirmPasswordField.SendKeys(d.Password); SelectElement SecurityQuestionDrop = new SelectElement(SecurityQuestionDropdown); SecurityQuestionDrop.SelectByText(d.Securityselection); SecurityQuestionAnswer.SendKeys(d.Securityanswer); NextButton.Click(); if (this._driver.Url == @"https://betacustomeraccess.myfloridaprepaid.com/enrollment/accountowner.aspx") { Tests.successCount++; Console.WriteLine("User: "******" created]"); } else { Tests.failCount++; Console.WriteLine("[FAIL] [RUN #" + Tests.runCount + "]" + "[User: "******" not created]"); } }
public MyBeazleyHomePage SuccessfullLogin() { ClearLoginInputs(); UsernameField.SendKeys("Bluefin User 1"); PasswordField.SendKeys("beazley02"); return(BtnSignIn.Click() as MyBeazleyHomePage); }
// Login Method takes username and password and click on Login button // Waiting for the overlay to disappear public void LoginMethod(string username, string password) { UsernameField.SendKeys(username); PasswordField.SendKeys(password); Loginbtn.Click(); _driver.ExplicitWait(10, "XPath", "/html/body/div[4]/h4"); _driver.ExplicitWaitInvisible(10, "XPath", "/html/body/div[4]/h4"); }
/// <summary> /// Modifies window-elements and sets user to online if user gives correct input /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void LogInButton_Click(object sender, RoutedEventArgs e) { bool matchfound = Account.LogIn(UsernameField.Text, PasswordField.Text); CheckUserOnline(matchfound); UsernameField.Clear(); PasswordField.Clear(); }
public void FillForm() { IsVisible(By.Id("PasswordField")); PasswordField.Clear(); SendData(PasswordField, "1"); IsVisible(By.Id("UsernameField")); UsernameField.Clear(); SendData(UsernameField, "1"); } // close FillForm
public LoginForm(LoginPresenter presenter) { InitializeComponent(); Presenter = presenter; Text = "Вход"; UsernameField.Select(); UsernameField.KeyPress += OnKeyPress; PasswordField.KeyPress += OnKeyPress; LoginBtn.KeyPress += OnKeyPress; FormDecraptifier.Decraptify(this); }
public void Login() { User defaultUser = User.GetDefaultCredentials(); UsernameField.SetValue(defaultUser.Username); PasswordField.SetValue(defaultUser.Password); Thread.Sleep(500); LoginBtn.Focus(); LoginBtn.Click(); //WaitUntilNotVisible(LoginBtn); }
public override void RowSelected(UITableView tableView, NSIndexPath indexPath) { // Username field row if (indexPath.Section == 0 && indexPath.Row == 0) { UsernameField.BecomeFirstResponder(); } // Password field row else if (indexPath.Section == 0 && indexPath.Row == 1) { PasswordField.BecomeFirstResponder(); } }
public AccountsHomePage SignupValid(User user) { UsernameField.SendKeys(user.name); FullnameField.SendKeys(user.fullName); EmailField.SendKeys(user.email); PasswordField.SendKeys(user.password); Password2Field.SendKeys(user.password); SignupButton.Click(); WaitForPageToLoad(); return(new AccountsHomePage(driver)); }
public AccountsLoginPage LoginAsInvalid(User invalidUser) { if (!IsDisplayed(By.Id("user_name"), 10)) { throw new ElementNotVisibleException("cannot find login field"); } UsernameField.SendKeys(invalidUser.name); PasswordField.SendKeys(invalidUser.password); LoginButton.Click(); WaitForPageToLoad(); return(new AccountsLoginPage(driver)); }
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); }
private void LoginButton_Click(object sender, EventArgs e) { bool t = service.login(new Domain.Angajat { Username = UsernameField.Text, Password = PasswordField.Text }); if (t) { vanzare = new Vanzare(this); vanzare.Show(); UsernameField.Clear(); PasswordField.Clear(); this.Hide(); } else { MessageBoxButtons buttons = MessageBoxButtons.OK; DialogResult result; result = MessageBox.Show("Username or password incorrect!", "Error", buttons); } }
public void FillForm() { IsVisible(By.Id("ConfirmPasswordField")); ConfirmPasswordField.Clear(); SendData(ConfirmPasswordField, "1"); IsVisible(By.Id("EmailField")); EmailField.Clear(); SendData(EmailField, "1"); IsVisible(By.Id("FirstNameField")); FirstNameField.Clear(); SendData(FirstNameField, "1"); IsVisible(By.Id("LastNameField")); LastNameField.Clear(); SendData(LastNameField, "1"); IsVisible(By.Id("MiddeNameField")); MiddeNameField.Clear(); SendData(MiddeNameField, "1"); IsVisible(By.Id("PasswordField")); PasswordField.Clear(); SendData(PasswordField, "1"); IsVisible(By.Id("PhoneField")); PhoneField.Clear(); SendData(PhoneField, "1"); IsClickable(SecurityGroupField); SecurityGroupFieldOption.SelectByIndex(1); IsVisible(By.Id("UsernameField")); UsernameField.Clear(); SendData(UsernameField, "1"); } // close FillForm
void LoginBtn_Click(object sender, RoutedEventArgs e) { FiltrateForm(); try { if (SecurityManager.AuthenticateUser(UsernameField.Text, PasswordField.Password)) { new Windows.MainWindow(SecurityManager.CurrentSessionInfo).Show(); this.Close(); } else { ErrorTextBlock.Text = "Въвели сте грешно потребителско име или парола!"; UsernameField.Focus(); } } catch (Exception ex) { ErrorTextBlock.Text = "Възникна грешка във връзката с базата данни:" + Environment.NewLine + ex.Message; UsernameField.Focus(); UsernameField.SelectAll(); } }
/// <summary> /// Modifies window-elements and logs out user /// <param name="sender"></param> /// <param name="e"></param> private void LogOutButton_Click(object sender, RoutedEventArgs e) { LogoutUser(); UsernameField.Clear(); PasswordField.Clear(); }
public void Login(String username, String password) { UsernameField.SendKeys(username); PasswordField.SendKeys(password); SignInButton.Click(); }
public void InputUsername() { driver.SwitchTo().Window(driver.WindowHandles.Last()); UsernameField.SendKeys("angular"); }
void Window_Loaded(object sender, RoutedEventArgs e) { UsernameField.Focus(); }
public void ClearLoginInputs() { UsernameField.Clear(); PasswordField.Clear(); }