public string SuccessfulAuthentification(string username, string password) { Pages.LoginPage loginPage = new Pages.LoginPage(driver); loginPage.GoToPage(); loginPage.PerformLogin(username, password); Pages.ConsultantPage consultantPage = new Pages.ConsultantPage(driver); return(consultantPage.GetLogedInUserNameText().Replace(" [ Сменить ] [ Выйти ]\r\n[ Печать визиток ]", string.Empty)); }
public string WrongPasswordAuthentification(string username, string password) { Pages.LoginPage loginPage = new Pages.LoginPage(driver); loginPage.GoToPage(); loginPage.PerformLogin(username, password); StringAssert.AreEqualIgnoringCase(loginPage.GetErrorMessageText(), "Неверный логин или пароль"); return(driver.Url.Replace("http://", string.Empty)); }
public void ChangeBranchUsingBranchTree() { Region region = new Region("Сибирь"); Town town = new Town(region, "Алейск"); Pages.LoginPage loginPage = new Pages.LoginPage(driver); loginPage.GoToPage(); loginPage.PerformLogin("Калиниченко Антон", "123456"); Pages.ConsultantPage consultantPage = new Pages.ConsultantPage(driver); consultantPage.ClickChangeBranchDialogButton(); Pages.ChangeBranchDialog changeBranchDialog = new Pages.ChangeBranchDialog(driver); changeBranchDialog.ChangeBranch(region, town); Assert.AreEqual(changeBranchDialog.branchName, consultantPage.GetCurrentBranchName()); }