public void InvalidLoginValidation() { string ExpectedAlertText = "Message :\r\n\r\n- The login details supplied were incorrect.\r\n"; _02_LoginPage _Login = new _02_LoginPage(_driver); ExtentReport.test = ExtentReport.extent.StartTest("Login Page: Invalid Login Validation"); string username = "******"; string password = "******"; _Login.Username(username); _Login.Password(password); _Login.LoginButton(); string ActualAlertText = BaseMethods.GetAlertText(_driver); Assert.AreEqual(ExpectedAlertText, ActualAlertText, "Assert Pass"); ExtentReport.test.Log(LogStatus.Pass, "Alert Message is Verified"); }
public void OnlyUsernameLoginValidation() { string ExpectedAlertText = "Message :\r\n\r\n- The system was not able to validate the login details supplied.\r\n"; _02_LoginPage _Login = new _02_LoginPage(_driver); ExtentReport.test = ExtentReport.extent.StartTest("Login Page: Only Username Login Validation"); ArrayList list = _Login.GetLoginDetails("ER_TESTDATA", "Login", "KeyName", "Admin"); string username = list[1].ToString(); string password = list[2].ToString(); _Login.Username(username); _Login.Password(password); _Login.LoginButton(); string ActualAlertText = BaseMethods.GetAlertText(_driver); Assert.AreEqual(ExpectedAlertText, ActualAlertText, "Assert Pass"); ExtentReport.test.Log(LogStatus.Pass, "Alert Message is Verified"); }
public void LogintoApplication() { _02_LoginPage _Login = new _02_LoginPage(_driver); ExtentReport.test = ExtentReport.extent.StartTest("Login Page: Login to Application"); ExtentReport.test.Log(LogStatus.Info, "Login Page Assertion Started"); string ExpectedValue = "Forgot your Password"; string ActualValue = _Login.GetLinkText(); Assert.AreEqual(ExpectedValue, ActualValue, "Assert Pass"); ExtentReport.test.Log(LogStatus.Pass, "Login Page Assertion Passed"); Logger.log.Info("Login Page Assert Passed"); ExtentReport.test.Log(LogStatus.Pass, "Logging into Application with valid UserID and Password"); Logger.log.Info("Logging into Application with valid UserID and Password"); ArrayList list = _Login.GetLoginDetails("ER_TESTDATA", "Login", "KeyName", "User"); string username = list[1].ToString(); string password = list[2].ToString(); _Login.Username(username); _Login.Password(password); _Login.LoginButton(); ExtentReport.test.Log(LogStatus.Pass, "Login to Application Test Passed"); Logger.log.Info("Login Test Ended"); }