public void ShouldSeeLogoutSuccessDisplayed()
        {
            FormAuthenticationPage form   = new FormAuthenticationPage(Driver);
            SecureAreaPage         secure = new SecureAreaPage(Driver);

            secure.LogoutButton().Click();
            form.IsLogoutSuccessNotificationDisplayed().Should().BeTrue();
        }
예제 #2
0
        public void ShouldSeeUsernameInvalidError()
        {
            new HomePage(Driver).ClickFormAuthenticationLink();
            FormAuthenticationPage form = new FormAuthenticationPage(Driver);

            form.ClickSubmit();

            form.IsUsernameErrorNotificationDisplayed().Should().BeTrue();
        }
        private void NavigateAndLogin()
        {
            new HomePage(Driver).ClickFormAuthenticationLink();
            FormAuthenticationPage form = new FormAuthenticationPage(Driver);

            form.EnterUsername("tomsmith");
            form.EnterPassword("SuperSecretPassword!");
            form.ClickSubmit();
        }
예제 #4
0
        public void ShouldSeePasswordInvalidError()
        {
            new HomePage(Driver).ClickFormAuthenticationLink();
            FormAuthenticationPage form = new FormAuthenticationPage(Driver);

            form.EnterUsername("tomsmith");
            form.ClickSubmit();

            form.IsPasswordErrorNotificationDisplayed().Should().BeTrue();
        }
예제 #5
0
        public void ShouldTryLoginWithInvalidCredentials()
        {
            new HomePage(Driver).ClickFormAuthenticationLink();
            FormAuthenticationPage form = new FormAuthenticationPage(Driver);

            form.EnterUsername("Peeter-Eeter Termomeeter");
            form.EnterPassword("CorrectHorseBatteryStaple");
            form.ClickSubmit();

            form.IsErrorNotificationDisplayed().Should().BeTrue();
        }
예제 #6
0
        public void ShouldLoginWithValidCredentials()
        {
            new HomePage(Driver).ClickFormAuthenticationLink();
            FormAuthenticationPage form = new FormAuthenticationPage(Driver);

            form.EnterUsername("tomsmith");
            form.EnterPassword("SuperSecretPassword!");
            form.ClickSubmit();

            form.IsSuccessNotificationDisplayed().Should().BeTrue();
        }
        public void FormAuthenticationPageTest(IDictionary<string, string> parameters)
        {
            new InternetPage(this.DriverContext).OpenHomePage().GoToFormAuthenticationPage();

            var formFormAuthentication = new FormAuthenticationPage(this.DriverContext);
            formFormAuthentication.EnterUserName(parameters["user"]);
            formFormAuthentication.EnterPassword(parameters["password"]);
            formFormAuthentication.LogOn();
            Verify.That(
                this.DriverContext,
                () => Assert.AreEqual(parameters["message"], formFormAuthentication.GetMessage));
        }
        public void Exercise_5_Test()
        {
            // TODO: Add your test code here
            var internetPage = new InternetPage(this.DriverContext);

            internetPage.OpenHomePage();
            internetPage.GoToPage("login");
            var formFormAuthentication = new FormAuthenticationPage(this.DriverContext);

            formFormAuthentication.EnterUserName(BaseConfiguration.Username);
            formFormAuthentication.EnterPassword(BaseConfiguration.Password);
            formFormAuthentication.LogIn();
            Assert.AreEqual("You logged into a secure area!", formFormAuthentication.GetMessageSecure());
        }
예제 #9
0
        public void FormAuthenticationPageTestCSV(IDictionary <string, string> parameters)
        {
            var basicAuthPage = new InternetPage(this.DriverContext);

            basicAuthPage.OpenHomePage();
            basicAuthPage.GoToPage("login");
            var formFormAuthentication = new FormAuthenticationPage(this.DriverContext);

            formFormAuthentication.EnterUserName(parameters["user"]);
            formFormAuthentication.EnterPassword(parameters["password"]);
            formFormAuthentication.LogIn();
            Verify.That(
                this.DriverContext,
                () => Assert.AreEqual(parameters["message"], formFormAuthentication.GetMessageSecure()));
        }