Exemple #1
0
        public void NavigateToAutorizePage()
        {
            AutorizePage_POM ap_POM = new AutorizePage_POM(chrome);

            mp_POM.NavigateToAutorizationPage();
            Assert.AreEqual("Вход", chrome.Title);
        }
        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);
        }
        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);
        }
        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);
        }
        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);
        }
        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, "Изменение пароля");
        }
Exemple #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);
        }
 public void LogInWithValidCredentials()
 {
     ap_POM = new AutorizePage_POM(chrome);
     ap_POM.FillLoginField("*****@*****.**").FillPassField("123qwe").ClickLoginButton();
     Assert.IsTrue(true);
 }