public void validcredentialsTest() { test = extent.CreateTest(TestContext.CurrentContext.Test.Name, "Test Login Page with valid email and valid password "); var LoginPage = new LoginPage(); var HomePage = new HomePage(); LoginPage.Login(LoginPage.UserName, "*****@*****.**", LoginPage.Password, "July012018", LoginPage.LoginInBtn, LoginPage.Last10RequestsTitle); BasicMethods.ClickBtn(HomePage.LogOffBtn); }
public void UserAccountActiveTest() { test = extent.CreateTest(TestContext.CurrentContext.Test.Name, "Scenario to check if the user account is active or inactive "); var LoginPage = new LoginPage(); var HomePage = new HomePage(); var ManageUser = new ManageUsersPage(); LoginPage.Login(LoginPage.UserName, "*****@*****.**", LoginPage.Password, "July012018", LoginPage.LoginInBtn, LoginPage.Last10RequestsTitle); // ManageUser.EditUserNameTest("Durga Prasad", "*****@*****.**", ManageUser.ManageUsersTableRow); ManageUser.IsActiveUserFalseTest("Durga Prasad", ManageUser.UserEmailTextBox, "*****@*****.**"); BasicMethods.ClickBtn(HomePage.LogOffBtn); LoginPage.Login(LoginPage.UserName, "*****@*****.**", LoginPage.Password, "Lost4now", LoginPage.LoginInBtn, LoginPage.Welcometitle); BasicMethods.VerifyText(LoginPage.BlankErrorMsg, "Sorry, you are not an active user for this website."); }
public void UnauthorizedAccessTest() { test = extent.CreateTest(TestContext.CurrentContext.Test.Name, "Test Login Page with unauthorized user credentials "); var LoginPage = new LoginPage(); var HomePage = new HomePage(); var ManageUser = new ManageUsersPage(); LoginPage.Login(LoginPage.UserName, "*****@*****.**", LoginPage.Password, "July012018", LoginPage.LoginInBtn, LoginPage.Last10RequestsTitle); ManageUser.EditUserFunc("Durga", ManageUser.UserEmailTextBox, "*****@*****.**", ManageUser.UserRole, ManageUser.UserRoleOptions, 2, ManageUser.FirstNameField, "Durga Prasad", ManageUser.LastNameField, "Palukuri", ManageUser.IsUserActiveCheckbox, ManageUser.SaveUserBtn); ManageUser.IsActiveUserTrueTest("Durga Prasad", ManageUser.UserEmailTextBox, "*****@*****.**"); BasicMethods.ClickBtn(HomePage.LogOffBtn); LoginPage.Login(LoginPage.UserName, "*****@*****.**", LoginPage.Password, "Lost4now", LoginPage.LoginInBtn, LoginPage.Welcometitle); BasicMethods.VerifyText(LoginPage.BlankErrorMsg, "Sorry, you do not have access to this website."); }