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();
            }
        }