/// <summary> /// Login to TA Dashboard page /// </summary> /// <param name="username">The username.</param> /// <param name="password">The password.</param> /// <param name="repositoryName">Name of the repository.</param> /// <Author>Long and Phat</Author> /// <returns></returns> public MainPage SignOn(string username, string password, string repositoryName = null) { if (repositoryName != null) { CmbRepo.SelectItem(repositoryName); } TxtUsername.SendKeys(username); TxtPassword.SendKeys(password); BtnLogin.Click(); return(new MainPage(WebDriver)); }
public LoginPage LoginInvalid(string username, string password) { //submit creds TxtUsername.Clear(); TxtUsername.SendKeys(username); TxtPassword.Clear(); TxtPassword.SendKeys(password); BtnLogin.Click(); //homepage return return(this); }
public HomePage Login(string username, string password) { //submit creds TxtUsername.Clear(); TxtUsername.SendKeys(username); TxtPassword.Clear(); TxtPassword.SendKeys(password); BtnLogin.Click(); //homepage return return(new HomePage()); }
/// <summary> /// Login a user to the application /// </summary> /// <param name="email"></param> /// <param name="password"></param> /// <param name="userProfile"></param> /// <param name="currTestContext"></param> /// <param name="screenShotDir"></param> /// <returns></returns> public object loginUser(string email, string password, string userProfile, TestContext currTestContext, string screenShotDir) { object pageObj = null; try { PageFactory.InitElements(BaseWebDriver, this); if (userProfile == userType.Admin) { email = adminUserName; password = adminPassword; } // set the email address TxtFeildEmailAddress.Clear(); TxtFeildEmailAddress.SendKeys(email); // set the password TxtFieldPassword.Clear(); TxtFieldPassword.SendKeys(password); //Take screenshot before login var fileName = TakeScreenShot(currTestContext, screenShotDir); // store filename if (fileName != null) { ScreenshotFileCollnt.Add(fileName); } // signs up a new user BtnLogin.Click(); if (userProfile == userType.Admin) { pageObj = new AdminPage(BaseWebDriver); } else { pageObj = new ApplicantPage(BaseWebDriver); } }catch (Exception) { } return(pageObj); }
public LoginPage ClickLoginExpectingError() { BtnLogin.Click(); return(new LoginPage(_driver)); }
public void Login(string username, string password) { TxtUsername.SendKeys(username); TxtPassword.SendKeys(password); BtnLogin.Click(); }
//Click on login button public void ClickOnLoginButton() { BtnLogin.Click(); }
public void Login(string email, string password) { TxtEmail.SendKeys(email); TxtPassword.SendKeys(password); BtnLogin.Click(); }
public void BtnLogin_click() { Utils.WaitForObjectBePresent(BtnLogin, wait); BtnLogin.Click(); Utils.WaitForObjectNotBePresent(BtnLogin, wait); }