示例#1
0
        public void LoginFieldValidationErrorMessage()
        {
            HomePage    homepage    = new HomePage(driver);
            LoginDialog logindialog = homepage.ClickLoginLink();

            logindialog.ClickLogin();
            Assert.AreEqual("Your login was unsuccessful - please try again", logindialog.GetAlertMessage(), "Alert Message did not display correctly");           // logindialog.ClickDismissIcon();
            logindialog.ClickDismissIcon();
            Assert.AreEqual("", logindialog.GetAlertMessage(), "Alert Message did not clear correctly");
        }
示例#2
0
        public void LoginProfileValidation()
        {
            HomePage homepage = new HomePage(driver);
            //string HomeURL = homepage.NaivgatetoUrl();
            LoginDialog logindialog = homepage.ClickLoginLink();
            string      username    = "******";

            logindialog.SetUserName(username);
            logindialog.SetPassowrd("ilovepizza");
            logindialog.ClickLogin();
            ProfilePage profile = homepage.ClickProfileLink();

            string       profileUrl = profile.GetProfileUrl();
            LogoutDialog logout     = profile.clickLogoutLink();

            logout.clickYesButton();
        }
示例#3
0
        public void MenuItemStarRating()
        {
            HomePage     homepage = new HomePage(driver);
            MenuItemPage menupage = homepage.clickMenuLink();

            menupage.clickDrinkTab();
            List <Item> items = menupage.getMenuItems(new MatchByStar(0));

            items[0].ClickStar(3);
            Assert.AreEqual(items[0].getStarRating(), 0, "All star did not have 0 rating ");

            LoginDialog loginDialog = menupage.ClickLoginLink();

            loginDialog.SetUserName("bob");
            loginDialog.SetPassowrd("ilovepizza");
            loginDialog.ClickLogin();

            items[0].ClickStar(3);
            Assert.AreEqual(items[0].getStarRating(), 3, "Incorrect number of stars ");
        }