コード例 #1
0
 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));
 }
コード例 #2
0
 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));
 }
コード例 #3
0
        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());
        }