public void BlankCredentialsTest() { test = extent.CreateTest(TestContext.CurrentContext.Test.Name, "Test Login Page with blank values"); var LoginPage = new LoginPage(); LoginPage.Login(LoginPage.UserName, "", LoginPage.Password, "", LoginPage.LoginInBtn, LoginPage.Welcometitle); BasicMethods.VerifyPartialText(LoginPage.BlankErrorMsg, "The Password field is required."); BasicMethods.VerifyText(LoginPage.BlankEmailErrorMsg, "The Email field is required."); BasicMethods.VerifyText(LoginPage.BlankPasswordErrorMsg, "The Password field is required."); BasicMethods.VerifyText(LoginPage.EmailErrorMsg, "The Email field is required."); BasicMethods.VerifyText(LoginPage.PasswordErrorMsg, "The Password field is required."); }
public void LoginPageUITest() { test = extent.CreateTest(TestContext.CurrentContext.Test.Name, "Verify UI"); var LoginPage = new LoginPage(); var ManageUsers = new ManageUsersPage(); var HomePage = new HomePage(); BasicMethods.CheckImage(LoginPage.HPLogo); BasicMethods.VerifyPartialText(LoginPage.Welcometitle, "Chemical Ordering Tool - HP Inc."); BasicMethods.VerifyText(LoginPage.WelcomeHeader, "Welcome to the Chemical Ordering Tool"); BasicMethods.VerifyText(LoginPage.WelcomeBanner, "This is a private tool. Explicit authorization from the tool owner is required for access or use. Unauthorized access or use may result in severe civil and/or criminal liability including without limitation under 18 USC Sections 1030 et seq. All rights whatsoever are reserved."); BasicMethods.VerifyText(LoginPage.LoginFormTitle, "Please log in using your HP Email and Password"); BasicMethods.VerifyText(LoginPage.ContactusLink, "Please contact COT Support ([email protected]) if you have questions."); }