Esempio n. 1
0
        public void CheckFailedLoginAlertText()
        {
            Pages.HomePage.ClickLoginPortalLink();
            Pages.LoginPortalPage.EnterLogin(ConfigurationManager.AppSettings["Login"]);
            Pages.LoginPortalPage.EnterPassword(ConfigurationManager.AppSettings["Password"]);
            Pages.LoginPortalPage.ClickLoginButton();
            Assert.AreEqual("validation failed", AlertHelper.GetAlertText());

            AlertHelper.AcceptAlert();
        }
Esempio n. 2
0
 public void CheckConfirmAlertLabelText()
 {
     Pages.HomePage.ClickPopupAlertsLink();
     Pages.PopupAlertsPage.ClickJsAlertClickMeButton();
     AlertHelper.AcceptAlert();
     Pages.PopupAlertsPage.ClickModalPopupClickMeButton();
     Pages.PopupAlertsPage.ClickAlertPopupXCloseButton();
     Pages.PopupAlertsPage.ClickJsConfirmBoxClickMeButton();
     AlertHelper.AcceptAlert();
     Pages.PopupAlertsPage.ClickJsConfirmBoxClickMeButton();
     AlertHelper.CancelAlert();
     Assert.AreEqual("You pressed Cancel!", Pages.PopupAlertsPage.GetConfirmAlertLabelText());
 }
Esempio n. 3
0
        public void CheckElementIsDroppedChangedColorAlertTextAppearMessageAppear()
        {
            Pages.HomePage.ClickActionsLink();
            Pages.ActionsPage.DragAndDropDragMeElement();
            Assert.AreEqual("Dropped!", Pages.ActionsPage.GetDropHereElementText());

            var clickMeElementColor = Pages.ActionsPage.GetDoubleClickMeElementColor();

            Pages.ActionsPage.DoubleClickDoubleClickMeElement();
            var afterDoubleClickClickMeElementColor = Pages.ActionsPage.GetDoubleClickMeElementColor();

            Assert.AreNotEqual(clickMeElementColor, afterDoubleClickClickMeElementColor);

            Pages.ActionsPage.HoverSecondDropdownMenu();
            Pages.ActionsPage.ClickLinkOneFromSecondDropdownList();
            Assert.AreEqual("Well done you clicked on the link!", AlertHelper.GetAlertText());

            AlertHelper.AcceptAlert();
            Pages.ActionsPage.ClickAndHoldClickAndHoldElement();
            Assert.That(Pages.ActionsPage.GetClickAndHoldElementText(), Contains.Substring("Well done"));
        }