/// <summary>
        /// Create Global Questions
        /// </summary>
        /// <param name="_driver">IWebDriver</param>
        public void CreateQuestions(IWebDriver _driver, string Key, string Sheet, string ConditionValue, string Value)
        {
            _04_GlobalQtnListPage GQP  = new _04_GlobalQtnListPage(_driver);
            ArrayList             list = ExcelData.GetData(Key, Sheet, ConditionValue, Value);
            int Count           = list.Count;
            int _actualRowCount = Count / 8;
            int j = 1;

            for (int i = 0; i < _actualRowCount; i++)
            {
                BaseMethods.InfoLogger("Creating Global 0" + (i + 1) + " Question Started");
                QuestionDetails();
                BaseMethods.DdlSelectByText(eleddlQuestionType, list[j].ToString());
                BaseMethods.InfoLogger("Question Type: " + list[(j)].ToString());
                string[] formTypesList = list[(j + 1)].ToString().Split(',');
                BaseMethods.CtrlKeyDown(_driver);
                for (int k = 0; k < formTypesList.Length; k++)
                {
                    BaseMethods.DdlSelectByText(eleddlFormType, formTypesList[k]);
                    BaseMethods.InfoLogger("Question Use: " + formTypesList[k].ToString());
                }
                if (list[(j + 2)].ToString() == "Yes")
                {
                    IsActiveYes();
                }
                else
                {
                    IsActiveNo();
                }
                ReferenceText(list[(j + 3)].ToString(), true);
                ShortQuestionText(list[(j + 4)].ToString());
                BaseMethods.TinyMCEEditor(_driver, eleFrame, list[(j + 5)].ToString());
                Save();
                string ExpectedSucessMsg = "×\r\n>   Global Question configuration updated successfully.   ";
                string ActualSucessMsg   = GetAlertMessage();
                BaseMethods.SoftAssertEqual(ExpectedSucessMsg, ActualSucessMsg);
                if (list[j].ToString() == "Group Question")
                {
                    CreateGlobalQueWithOptionsPage ChildQue = new CreateGlobalQueWithOptionsPage(_driver);
                    // Click on Answer Options Tab
                    AnswerOptions();
                    ChildQue.CreateNewChildQuestion(_driver);
                }
                if (list[j].ToString() == "Group Question" || list[j].ToString() == "Multi Select")
                {
                    // Click on Answer Options Tab
                    AnswerOptions();
                    AddNewAnswers(_driver, list[(j + 6)].ToString());
                }
                j = j + 8;
                GlobalQuestionLink();
                GQP.CreateNewGlbQtn();
            }
        }
        public void DeleteGlobalQuestions(IWebDriver _driver, string Key, string Sheet)
        {
            ArrayList list  = ExcelData.GetData(Key, Sheet);
            int       Count = list.Count;

            for (int i = 0; i < Count; i++)
            {
                BaseMethods.InfoLogger("Deleting Global 0" + (i + 1) + " Question Started");
                _04_GlobalQtnListPage GlbQtnListPage = new _04_GlobalQtnListPage(_driver);
                if (list[i].ToString() != "EnterQuestionName")
                {
                    GlbQtnListPage.SearchKeyword(list[i].ToString());
                    GlbQtnListPage.Search();
                    BaseMethods.DdlSelectByText(GlbQtnListPage.eleDdlIsActive, "All");
                    try
                    {
                        IWebElement ele = _driver.FindElement(By.XPath("//div[@class='tableBoundaries']/table/tbody/tr/td[1]/span/../../td[6]/span[2]"));
                        ele.Click();
                        Delete();
                        string DeleteExpectedSucessMsg = "×\r\n>   Global Question deleted successfully.   ";
                        string DeleteActualSucessMsg   = GetAlertMessage();
                        BaseMethods.SoftAssertEqual(DeleteExpectedSucessMsg, DeleteActualSucessMsg);
                        ExcelData.UpdateData("GlobalQuestionsData", "Delete_GlobalQuestion", "Question_Reference", "EnterQuestionName", "Question_Reference", list[i].ToString());
                    }
                    catch (Exception ex)
                    {
                        Logger.log.Info("No Records Found to Delete" + ex.Message);
                        ExtentReport.test.Log(LogStatus.Fatal, "No Records Found to Delete");
                    }
                }
                else
                {
                    BaseMethods.InfoLogger("Question name is not provided. Skipping this..");
                }
            }
        }
        public void EditGlobalQuestion(IWebDriver _driver, string Key, string Sheet, string ConditionValue, string Value)
        {
            _04_GlobalQtnListPage GQP  = new _04_GlobalQtnListPage(_driver);
            ArrayList             list = ExcelData.GetData(Key, Sheet, ConditionValue, Value);
            int Count           = list.Count;
            int _actualRowCount = Count / 8;
            int j = 1;

            for (int i = 0; i < _actualRowCount; i++)
            {
                BaseMethods.InfoLogger("Creating Global 0" + (i + 1) + " Question Started");
                QuestionDetails();
                BaseMethods.DdlSelectByText(eleddlQuestionType, list[j].ToString());
                BaseMethods.InfoLogger("Question Type: " + list[(j)].ToString());
                string[] formTypesList = list[(j + 1)].ToString().Split(',');
                BaseMethods.CtrlKeyDown(_driver);
                for (int k = 0; k < formTypesList.Length; k++)
                {
                    BaseMethods.DdlSelectByText(eleddlFormType, formTypesList[k]);
                    BaseMethods.InfoLogger("Question Use: " + formTypesList[k].ToString());
                }
                BaseMethods.CtrlKeyUp(_driver);
                if (list[(j + 2)].ToString() == "Yes")
                {
                    IsActiveYes();
                }
                else
                {
                    IsActiveNo();
                }
                ReferenceText(list[(j + 3)].ToString(), true);
                ShortQuestionText(list[(j + 4)].ToString());
                BaseMethods.TinyMCEEditor(_driver, eleFrame, list[(j + 5)].ToString());
                Save();
                string ExpectedSucessMsg = "×\r\n>   Global Question configuration updated successfully.   ";
                string ActualSucessMsg   = GetAlertMessage();
                BaseMethods.SoftAssertEqual(ExpectedSucessMsg, ActualSucessMsg);
                if (list[j].ToString() == "Group Question")
                {
                    CreateGlobalQueWithOptionsPage ChildQue = new CreateGlobalQueWithOptionsPage(_driver);
                    // Click on Answer Options Tab
                    AnswerOptions();
                    ChildQue.CreateNewChildQuestion(_driver);
                }
                if (list[j].ToString() == "Group Question" || list[j].ToString() == "Multi Select")
                {
                    // Click on Answer Options Tab
                    AnswerOptions();
                    AddNewAnswers(_driver, list[(j + 6)].ToString());
                }

                // Edit the Question
                GlobalQuestionLink();
                _04_GlobalQtnListPage GlbQtnListPage = new _04_GlobalQtnListPage(_driver);
                string SearchKeyword = _QuestionReference.Replace("_PM", "").Replace("_AM", "");
                GlbQtnListPage.SearchKeyword(_QuestionReference);
                GlbQtnListPage.Search();
                BaseMethods.DdlSelectByText(GlbQtnListPage.eleDdlIsActive, "All");
                try
                {
                    IWebElement ele = _driver.FindElement(By.XPath("//div[@class='tableBoundaries']/table/tbody/tr/td[1]/span/../../td[6]/span[1]"));
                    ele.Click();
                    QuestionDetails();

                    if (elerdoIsActiveYES.Selected)
                    {
                        IsActiveNo();
                    }
                    else
                    {
                        IsActiveYes();
                    }
                    ReferenceText("Edit_Question Reference Edited", true);
                    ShortQuestionText("Edit_Short Question Edited");
                    BaseMethods.TinyMCEEditor(_driver, eleFrame, "Global Question Editior Text Modified");
                    BaseMethods.PageScrollDown(_driver);
                    Save();
                    string EditExpectedSucessMsg = "×\r\n>   Global Question configuration updated successfully.   ";
                    string EditActualSucessMsg   = GetAlertMessage();
                    BaseMethods.SoftAssertEqual(EditExpectedSucessMsg, EditActualSucessMsg);
                    ExcelData.InsertData("GlobalQuestionsData", "Delete_GlobalQuestion", "Question_Reference", _QuestionReference);
                }
                catch (Exception ex)
                {
                    Logger.log.Info("No Records Found to Edit" + ex.Message);
                    ExtentReport.test.Log(LogStatus.Fatal, "No Records Found to Edit");
                }
                j = j + 8;
                GlobalQuestionLink();
                GQP.CreateNewGlbQtn();
            }
        }
        public void CreateQuestionWithOptions(IWebDriver _driver)
        {
            _04_GlobalQtnListPage GQP = new _04_GlobalQtnListPage(_driver);

            ArrayList list            = ExcelData.GetData("GlobalQuestionsData", "GlobalQuestionWithOptions", "Execute", "Yes");
            int       Count           = list.Count;
            int       _actualRowCount = Count / 21;
            int       j = 1;

            for (int i = 0; i < _actualRowCount; i++)
            {
                BaseMethods.InfoLogger("Creating Global Question with Options Started");

                QuestionDetails();

                BaseMethods.DdlSelectByText(ComponentType(), list[j].ToString());
                BaseMethods.InfoLogger("Question Type: " + list[j].ToString());

                string[] formTypesList = list[(j + 1)].ToString().Split(',');
                for (int k = 0; k < formTypesList.Length; k++)
                {
                    BaseMethods.DdlSelectByText(FormType(), formTypesList[k]);
                    BaseMethods.InfoLogger("Question Use: " + formTypesList[k].ToString());
                }
                if (list[(j + 2)].ToString() == "Yes")
                {
                    IsActiveYes();
                }
                else
                {
                    IsActiveNo();
                }
                ReferenceText(list[(j + 3)].ToString(), true);
                ShortQuestionText(list[(j + 4)].ToString());
                BaseMethods.TinyMCEEditor(_driver, GlobalQuestionLabel(), list[(j + 5)].ToString());

                BaseMethods.PageScrollUp(_driver);

                BaseMethods.SleepTimeOut(2000);
                QuestionOptions();
                BaseMethods.DdlSelectByText(AnswerDisplayFormat(), list[(j + 6)].ToString());
                BaseMethods.InfoLogger("Answer Display Format: " + list[(j + 6)].ToString());

                BaseMethods.DdlSelectByText(DataType(), list[(j + 7)].ToString());
                BaseMethods.InfoLogger("Data Type: " + list[(j + 7)].ToString());

                BaseMethods.NoYesRadioButtons(_driver, CandidatePrefill(), list[(j + 8)].ToString());
                BaseMethods.InfoLogger("Candidate Prefil: " + list[(j + 8)].ToString());

                BaseMethods.NoYesRadioButtons(_driver, JobPrefill(), list[(j + 9)].ToString());
                BaseMethods.InfoLogger("Job Prefil: " + list[(j + 9)].ToString());

                BaseMethods.NoYesRadioButtons(_driver, CandidateSingleInstanced(), list[(j + 10)].ToString());
                BaseMethods.InfoLogger("Candidate Single Instanced: " + list[(j + 10)].ToString());

                BaseMethods.NoYesRadioButtons(_driver, JobSingleInstanced(), list[(j + 11)].ToString());
                BaseMethods.InfoLogger("Job Single Instanced: " + list[(j + 11)].ToString());

                BaseMethods.NoYesRadioButtons(_driver, Versioned(), list[(j + 12)].ToString());
                BaseMethods.InfoLogger("Is Versioned: " + list[(j + 12)].ToString());

                BaseMethods.NoYesRadioButtons(_driver, IsRequired(), list[(j + 13)].ToString());
                BaseMethods.InfoLogger("Is Required: " + list[(j + 13)].ToString());

                // BaseMethods.CtrlKeyDown(_driver);

                if (list[(j + 14)].ToString() != "Null")
                {
                    MaxLength(list[(j + 14)].ToString());
                }

                if (ValidationType().Displayed)
                {
                    BaseMethods.DdlSelectByText(ValidationType(), list[(j + 15)].ToString());
                    BaseMethods.InfoLogger("Validation Type: " + list[(j + 15)].ToString());
                }

                BaseMethods.SelectRadioButtonWithValue(_driver, HTMLComponentOrientation(), list[(j + 16)].ToString());
                BaseMethods.InfoLogger("Input Orientation: " + list[(j + 16)].ToString());

                BaseMethods.SelectRadioButtonWithValue(_driver, HTMLAnswerAlignment(), list[(j + 17)].ToString());
                BaseMethods.InfoLogger("Input Orientation: " + list[(j + 17)].ToString());

                BaseMethods.NoYesRadioButtons(_driver, RecruiterView(), list[(j + 18)].ToString());
                BaseMethods.InfoLogger("Hide From Recruiters: " + list[(j + 18)].ToString());

                GlobalComponentXMLName(list[(j + 19)].ToString());

                Save();

                string ExpectedSucessMsg = "×\r\n>   Global Question configuration updated successfully.   ";
                string ActualSucessMsg   = GetAlertMessage();
                Assert.AreEqual(ExpectedSucessMsg, ActualSucessMsg);
                j = j + 21;
                GlobalQuestionLink();
                GQP.CreateNewGlbQtn();
            }
        }