public void LoginUser(string username, string password) { Username.Enter(username); Password.Enter(password); KeepMeLoggedIn.Check(); LogInButton.Click(WaitForDisappear); }
//The main method that runs the selenium public int Run(User user) { int runPassed = 1; int likeCount; try { MaximiseWindow(); NavigateToWebsite(); SetLoginScreenElements(); EnterCredentials(); LogInButton.Click(); for (int tagCount = 0; tagCount < Hashtag.Count(); tagCount++) { likeCount = 0; Thread.Sleep(10000); SetHomeScreenElements(); EnterHashtag(); SetSearchTermLink(); ClickSearchTermLink(); SetHashtagImageLink(); ClickHashtagImageLink(); for (int i = 0; i < NumOfLikes; i++) { SetHeartButton(); SetNextImageButton(); ClickHeartButton(); ClickNextImageButton(); Thread.Sleep(3000); likeCount++; if (i == NumOfLikes - 1) { SetXButton(); ClickXButton(); } } user.UpdateHashtagLikes(tagCount, likeCount); UpdateHashtagCounter(); } } catch (Exception) { runPassed = 0; } Thread.Sleep(5000); QuitDriver(); return(runPassed); }
public LogInPage LogIn(string username, string password) { FillUsername(username); FillPassword(password); LogInButton.Click(); return(this); }
public LogInVeryfyingPage LogIn(string username, string password) { FillUsername(username); FillPassword(password); LogInButton.Click(); return(new LogInVeryfyingPage { Driver = Driver });; }
public void InvalidLogIn() { Browser.WaitForElements(new List <IWebElement>() { UserName, UserPassword, LogInButton }); UserName.SendKeys(Browser.getUser()); UserPassword.SendKeys(PasswordGenerator.GetRandomPassword()); LogInButton.Click(); }
public void LogIn() { Browser.WaitForElements(new List <IWebElement>() { UserName, UserPassword, LogInButton }); UserName.Clear(); UserPassword.Clear(); UserName.SendKeys(Browser.getUser()); UserPassword.SendKeys(Browser.getPassword()); LogInButton.Click(); }
/// <summary> /// Perform the login action itself /// </summary> public void Login() { try { GenericUtilities.Wait(5); if (UserName.Text.Equals(userName) == false) { if (UserName.Text != "") { UserName.Clear(); } UserName.SendKeys(userName); } if (Password.Text != "") { Password.Clear(); } Password.SendKeys(password); //try //{ // AppiumDriver.Instance.HideKeyboard(); //} //catch //{ } GenericUtilities.Wait(3); //UserName.Click(); //There is an issue with Password field when cursor is in it, unable to click SignIn button, do not remove this. LogInButton.Click(); //LogResults.LogPass("Signed In successfully"); } catch (Exception ex) { //LogResults.LogFail("Failed to Login" + ex.InnerException.Message); } }
public void ClickLoginButton() { LogInButton.Click(); }
public void ClickOnLogInButton() { LogInButton.Click(); }