Exemplo n.º 1
0
        //Test on input invaid sybols (
        public void TestLogin2()
        {
            goTo.LoginPage(ConfigurationManager.AppSettings["LoginPage"]);
            loginObjects.WaitLoginPage();
            loginObjects.InputLogin(ConfigurationManager.AppSettings["InvalidLogin"]);
            loginObjects.InputPwd(ConfigurationManager.AppSettings["InvalidPwd"]);
            loginObjects.LoginButton();

            System.Threading.Thread.Sleep(2000);
            IWebElement errorMessage = wait.Until(ExpectedConditions.ElementIsVisible(By.CssSelector("#gate > div > div.vb-content > div > div > div > div.plate.animated.fadeIn.margin-b-20 > form:nth-child(2) > div:nth-child(2) > span")));

            Assert.IsTrue(errorMessage.Text.Contains("The login-username field must be a valid email."));
        }
Exemplo n.º 2
0
        //Test on input valid symbols, but not registered user
        public void TestLogin1()
        {
            goTo.LoginPage(ConfigurationManager.AppSettings["LoginPage"]);
            loginObjects.WaitLoginPage();
            loginObjects.InputLogin(ConfigurationManager.AppSettings["Login"]);
            loginObjects.InputPwd(ConfigurationManager.AppSettings["Pwd"]);
            loginObjects.LoginButton();

            System.Threading.Thread.Sleep(2000);
            IWebElement errorMessage = wait.Until(ExpectedConditions.ElementIsVisible(By.CssSelector("#gate > div > div.vb-content > div > div > div > div.plate.animated.fadeIn.margin-b-20.has-error > form:nth-child(2) > div:nth-child(3) > span:nth-child(4)")));

            Assert.IsTrue(errorMessage.Text.Contains("Username and/or Password not valid."));
        }
Exemplo n.º 3
0
        //Login test without input symbols
        public void TestLogin3()
        {
            goTo.LoginPage(ConfigurationManager.AppSettings["LoginPage"]);
            loginObjects.WaitLoginPage();
            loginObjects.LoginButton();

            System.Threading.Thread.Sleep(2000);
            IWebElement errorMessage = wait.Until(ExpectedConditions.ElementIsVisible(By.CssSelector("#gate > div > div.vb-content > div > div > div > div.plate.animated.fadeIn.margin-b-20 > form:nth-child(2) > div:nth-child(2) > span")));

            Assert.IsTrue(errorMessage.Text.Contains("Login-username is required"));

            IWebElement errorMessage2 = wait.Until(ExpectedConditions.ElementIsVisible(By.CssSelector("#gate > div > div.vb-content > div > div > div > div.plate.animated.fadeIn.margin-b-20 > form:nth-child(2) > div:nth-child(3) > span")));

            Assert.IsTrue(errorMessage2.Text.Contains("Login-password is required"));
        }