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(); }
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")); }