public void CreateUserGroup(string ConfigKey, string SheetName)
        {
            ArrayList list  = ExcelData.GetData(ConfigKey, SheetName, "Execute", "Yes");
            int       count = list.Count;

            count = count / 5;
            int j = 1;

            for (int i = 1; i <= count; i++)
            {
                CreateUserGroupLink();
                UserGroupName(list[j].ToString());
                UserGroupDescription(list[(j + 1)].ToString());
                BaseMethods.DdlSelectByText(eleDdlDefaultBEEvent, list[(j + 2)].ToString());
                Save();
                string ExpectedResult = "×\r\n>   User Group configuration updated.    >   User Group members updated.   ";
                string ActualResult   = DivAlertMsg();
                Assert.AreEqual(ExpectedResult, ActualResult);
                ModulePermissions mp = new ModulePermissions(driver);
                mp.SelectModulePermissions(driver, ConfigKey, "ModulePermissions", "RowNumber", list[(j + 3)].ToString(), "UserGroup");
                FunctionPermissions FP = new FunctionPermissions(driver);
                FP.SelectFunctionPermissions(driver, ConfigKey, "FunctionPermissions", "RowNumber", list[(j + 3)].ToString(), "UserGroup");
                JobPermissions jp = new JobPermissions(driver);
                jp.AddJobPermission(driver, ConfigKey, "JobPermissions", "RowNumber", list[(j + 3)].ToString(), "UserGroup");
                RequisitionPermissions rp = new RequisitionPermissions(driver);
                rp.AddRequisitionPermissions(driver, ConfigKey, "RequisitionPermission", "RowNumber", list[(j + 3)].ToString(), "UserGroup");
                AssignUserDefinedViews Audv = new AssignUserDefinedViews(driver);
                Audv.AddAssignUserDefinedViews(ConfigKey, "AssignUDV", "RowNumber", list[(j + 3)].ToString());
                ActivityBlockPermissions abp = new ActivityBlockPermissions(driver);
                abp.SelectABIPermissions(driver, ConfigKey, "ABIPermissions", "RowNumber", list[(j + 3)].ToString(), "UserGroup");
                RolePermissions rolep = new RolePermissions(driver);
                rolep.SelectRolePermissions(driver, ConfigKey, "RolePermissions", "RowNumber", list[(j + 3)].ToString());
                JobBoardAccountPermissions jbp = new JobBoardAccountPermissions(driver);
                jbp.SelectJobBoardAccountPermissions(driver, ConfigKey, "JobBoardAccountPermissions", "RowNumber", list[(j + 3)].ToString());
                SetDefaultTalentSearchTemplate Dtst = new SetDefaultTalentSearchTemplate(driver);
                Dtst.DefaultTalentSearchTemplate(ConfigKey, "DefaultTalentSearchTemplate", "RowNumber", list[(j + 3)].ToString(), "UserGroup");
                SetListDefaults Sld = new SetListDefaults(driver);
                Sld.SetListDefaultsTaskList(ConfigKey, "SetListDefaults", "RowNumber", list[(j + 3)].ToString());
                j += 5;
            }
        }
예제 #2
0
        public void CreateUser(string ConfigKey, string SheetName)
        {
            ArrayList list  = ExcelData.GetData(ConfigKey, SheetName, "Execute", "Yes");
            int       count = list.Count;

            count = count / 21;
            int j = 1;

            for (int i = 0; i < count; i++)
            {
                LinkCreateUser();
                TxtUserName(list[j].ToString());
                TxtPassword(list[(j + 1)].ToString());
                TxtConfirmPassword(list[(j + 1)].ToString());
                BaseMethods.DdlSelectByText(eleDdlUserStatus, list[(j + 2)].ToString());
                BaseMethods.ScrollToView(driver, eleDateExpiryDate);
                eleDateExpiryDate.Clear();
                eleDateExpiryDate.SendKeys(list[(j + 3)].ToString());
                BaseMethods.YesNoRadioButtons(driver, eleRadioChangePasswordNextLogin, list[(j + 4)].ToString());
                BaseMethods.DdlSelectByText(eleDdlUserGroup, list[(j + 5)].ToString());
                BaseMethods.DdlSelectByText(eleDdlRegion, list[(j + 6)].ToString());
                BaseMethods.DdlSelectByText(eleDdlLanguage, list[(j + 7)].ToString());
                BaseMethods.DdlSelectByText(eleDdlTimeZone, list[(j + 8)].ToString());
                if (list[(j + 9)].ToString() != "Null")
                {
                    TxtEmployeeNumber(list[(j + 9)].ToString());
                }
                TxtEmailAddress(list[(j + 10)].ToString());
                TxtFirstName(list[(j + 11)].ToString());
                TxtLastName(list[(j + 12)].ToString());
                if (list[(j + 13)].ToString() != "Null")
                {
                    TxtPositionNumber(list[(j + 13)].ToString());
                }
                if (list[(j + 14)].ToString() != "Null")
                {
                    TxtPositionTitle(list[(j + 14)].ToString());
                }
                if (list[(j + 15)].ToString() != "Null")
                {
                    TxtReportsPositionNumber(list[(j + 15)].ToString());
                }
                if (list[(j + 16)].ToString() != "Null")
                {
                    TxtReportstoTitle(list[(j + 16)].ToString());
                }
                if (list[(j + 17)].ToString() != "Null")
                {
                    TxtReportstoName(list[(j + 17)].ToString());
                }
                DefaultBackendHomepage(list[(j + 18)].ToString());
                Save();
                string ExpectedValue = "×\r\n>   User configuration updated.    >   User Details saved successfully    ";
                string ActualValue   = DivAlertMsg();
                BaseMethods.SoftAssertEqual(ExpectedValue, ActualValue);
                ModulePermissions mp = new ModulePermissions(driver);
                mp.SelectModulePermissions(driver, ConfigKey, "ModulePermissions", "RowNumber", list[(j + 19)].ToString(), "User");
                FunctionPermissions FP = new FunctionPermissions(driver);
                FP.SelectFunctionPermissions(driver, ConfigKey, "FunctionPermissions", "RowNumber", list[(j + 19)].ToString(), "User");
                JobPermissions jp = new JobPermissions(driver);
                jp.AddJobPermission(driver, ConfigKey, "JobPermissions", "RowNumber", list[(j + 19)].ToString(), "User");
                RequisitionPermissions rp = new RequisitionPermissions(driver);
                rp.AddRequisitionPermissions(driver, ConfigKey, "RequisitionPermission", "RowNumber", list[(j + 19)].ToString(), "User");
                AssignUserDefinedViews Audv = new AssignUserDefinedViews(driver);
                Audv.AddAssignUserDefinedViews(ConfigKey, "AssignUDV", "RowNumber", list[(j + 19)].ToString());
                ActivityBlockPermissions abp = new ActivityBlockPermissions(driver);
                abp.SelectABIPermissions(driver, ConfigKey, "ABIPermissions", "RowNumber", list[(j + 19)].ToString(), "User");
                RolePermissions rolep = new RolePermissions(driver);
                rolep.SelectRolePermissions(driver, ConfigKey, "RolePermissions", "RowNumber", list[(j + 19)].ToString());
                JobBoardAccountPermissions jbp = new JobBoardAccountPermissions(driver);
                jbp.SelectJobBoardAccountPermissions(driver, ConfigKey, "JobBoardAccountPermissions", "RowNumber", list[(j + 19)].ToString());
                SetDefaultTalentSearchTemplate Dtst = new SetDefaultTalentSearchTemplate(driver);
                Dtst.DefaultTalentSearchTemplate(ConfigKey, "DefaultTalentSearchTemplate", "RowNumber", list[(j + 19)].ToString(), "User");
                SetListDefaults Sld = new SetListDefaults(driver);
                Sld.SetListDefaultsTaskList(ConfigKey, "SetListDefaults", "RowNumber", list[(j + 19)].ToString());
                j += 21;
            }
        }