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 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()); }