コード例 #1
0
        public void NavigateToAutorizePage()
        {
            AutorizePage_POM ap_POM = new AutorizePage_POM(chrome);

            mp_POM.NavigateToAutorizationPage();
            Assert.AreEqual("Вход", chrome.Title);
        }
コード例 #2
0
        public void LogInWithInvalidPass(string login, string pass, string errorMessage)
        {
            ap_POM = new AutorizePage_POM(chrome);
            ap_POM.FillLoginField(login).FillPassField(pass).ClickLoginButton();
            string actualError = ap_POM.GetLoginErrorMessage();

            Assert.AreEqual(errorMessage, actualError);
        }
コード例 #3
0
        public void NavigateToRegister()
        {
            ap_POM = new AutorizePage_POM(chrome);
            RegistrationPage_POM rp_POM = new RegistrationPage_POM(chrome);

            ap_POM.ClickRegisterLink();
            string navigatedUrl = rp_POM.GetPageTitle();

            Assert.AreEqual("Регистрация", navigatedUrl);
        }
コード例 #4
0
        public void ForgetPasswordNavigation()
        {
            ap_POM = new AutorizePage_POM(chrome);
            ForgotPassword_POM fp_POM = new ForgotPassword_POM(chrome);

            ap_POM.ClickForgetPassword();
            string navigatedUrl = fp_POM.GetPageTitle();

            Assert.AreEqual("Изменение пароля", navigatedUrl);
        }
コード例 #5
0
        public void CheckBackRedirection()
        {
            AutorizePage_POM ap_POM        = new AutorizePage_POM(chrome);
            string           expextedTitle = chrome.Title;

            ap_POM.ClickRegisterLink();
            Assert.AreEqual("Вход", chrome.Title);
            chrome.Navigate().Back();
            Assert.AreEqual(expextedTitle, chrome.Title);
        }
コード例 #6
0
        public void ForgetPasswordNavigationThroughtErrorMessage()
        {
            ap_POM = new AutorizePage_POM(chrome);
            ForgotPassword_POM fp_POM = new ForgotPassword_POM(chrome);

            ap_POM.FillLoginField("*****@*****.**").FillPassField("4f4f4f4f4f4").ClickLoginButton();
            ap_POM.ClickErrorForgetPassword();
            string navigatedUrl = fp_POM.GetPageTitle();

            Assert.AreEqual(navigatedUrl, "Изменение пароля");
        }
コード例 #7
0
        public void NavigateToSocialMediaPages(string socialMedia, string expectedTitle)
        {
            AutorizePage_POM ap_POM = new AutorizePage_POM(chrome);

            chrome.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
            mp_POM.ClickOnSocialMedia(socialMedia);
            string tabId = chrome.WindowHandles.Last();

            chrome.SwitchTo().Window(tabId);
            string actualTitle = chrome.Title;

            if (socialMedia == "fb")
            {
                actualTitle = actualTitle.Substring(0, 38);
            }
            Assert.AreEqual(expectedTitle, actualTitle);
        }
コード例 #8
0
 public void LogInWithValidCredentials()
 {
     ap_POM = new AutorizePage_POM(chrome);
     ap_POM.FillLoginField("*****@*****.**").FillPassField("123qwe").ClickLoginButton();
     Assert.IsTrue(true);
 }