Пример #1
0
        public void FirstNameFieldErrorValidation()
        {
            test = extent.CreateTest(TestContext.CurrentContext.Test.Name, "Error validation in firstname field in create user popup message");
            var LoginPage  = new LoginPage();
            var ManageUser = new ManageUsersPage();

            LoginPage.Login(LoginPage.UserName, "*****@*****.**", LoginPage.Password, "July012018", LoginPage.LoginInBtn, LoginPage.Last10RequestsTitle);
            ManageUser.CreateUserFunc(ManageUser.UserEmailTextBox, "*****@*****.**", ManageUser.UserRole, ManageUser.UserRoleOptions, 1, ManageUser.FirstNameField, " ", ManageUser.LastNameField, "Govindan", ManageUser.CreateUserBtn);
            BasicMethods.VerifyText(ManageUser.firstnameerrormsg, "First Name should not be empty.");
            ManageUser.CreateUserFunc(ManageUser.UserEmailTextBox, "*****@*****.**", ManageUser.UserRole, ManageUser.UserRoleOptions, 1, ManageUser.FirstNameField, "****", ManageUser.LastNameField, "Govindan", ManageUser.CreateUserBtn);
            BasicMethods.VerifyText(ManageUser.firstnameerrormsg, "First Name should not contain anything except letters and spaces.");
        }
Пример #2
0
        public void EmailFieldErrorValidation()
        {
            test = extent.CreateTest(TestContext.CurrentContext.Test.Name, "Error validation in email field in create user popup message");
            var LoginPage  = new LoginPage();
            var ManageUser = new ManageUsersPage();

            LoginPage.Login(LoginPage.UserName, "*****@*****.**", LoginPage.Password, "July012018", LoginPage.LoginInBtn, LoginPage.Last10RequestsTitle);
            ManageUser.CreateUserFunc(ManageUser.UserEmailTextBox, "!@#$%^&*()", ManageUser.UserRole, ManageUser.UserRoleOptions, 1, ManageUser.FirstNameField, "Kumaresh", ManageUser.LastNameField, "Govindan", ManageUser.CreateUserBtn);
            BasicMethods.VerifyText(ManageUser.userEmailErrorMsg, "Please provide a valid email address");
            ManageUser.CreateUserFunc(ManageUser.UserEmailTextBox, "*****@*****.**", ManageUser.UserRole, ManageUser.UserRoleOptions, 1, ManageUser.FirstNameField, "Kumaresh", ManageUser.LastNameField, "Govindan", ManageUser.CreateUserBtn);
            BasicMethods.VerifyText(ManageUser.userEmailErrorMsg, "Please enter a valid HP Email Id.");
            ManageUser.CreateUserFunc(ManageUser.UserEmailTextBox, "*****@*****.**", ManageUser.UserRole, ManageUser.UserRoleOptions, 1, ManageUser.FirstNameField, "Kumaresh", ManageUser.LastNameField, "Govindan", ManageUser.CreateUserBtn);
            BasicMethods.VerifyText(ManageUser.GeneralErrorMsg, "Email is already exists.");
        }
Пример #3
0
        public void CreateUserFunctionalityTest()
        {
            test = extent.CreateTest(TestContext.CurrentContext.Test.Name, "Test create user functionality");
            var LoginPage  = new LoginPage();
            var ManageUser = new ManageUsersPage();

            LoginPage.Login(LoginPage.UserName, "*****@*****.**", LoginPage.Password, "July012018", LoginPage.LoginInBtn, LoginPage.Last10RequestsTitle);
            ManageUser.CreateUserFunc(ManageUser.UserEmailTextBox, "*****@*****.**", ManageUser.UserRole, ManageUser.UserRoleOptions, 0, ManageUser.FirstNameField, "Kumaresh", ManageUser.LastNameField, "Govindan", ManageUser.CreateUserBtn);
            Validations.validateTitle("Manage Users - Chemical Ordering Tool");
            ManageUser.SearchUser(ManageUser.SearchTextBox, "*****@*****.**");
        }