public void CreateCompetency_SameName()
        {
            int    i    = 0;
            string name = "Competency_" + DateTime.Now.ToString().Replace(' ', '_').Replace(':', '_').Replace('/', '_');

            while (i < 2)
            {
                Thread.Sleep(2000);
                AddCompetencyButton.Click();
                Thread.Sleep(6000);

                PopupName_Textbox.Clear();
                PopupName_Textbox.SendKeys(name);

                PopupDescription_Textbox.Clear();
                PopupDescription_Textbox.SendKeys("Competency Description");

                PopupActiveYes_RadioButton.Click();

                PopupSubmit_Button.Click();
                i++;
                Thread.Sleep(3000);
                Assert.IsTrue(SuccessMessage.Displayed, name + " - Active Competency is not created successfully");
                ExtentReport.test.Log(LogStatus.Pass, "Success Message is displayed, " + name + " - Active Competency created successfully");
            }
            SearchCompetency(name);

            Assert.AreEqual(2, CompetencyList.Count, "Creating of same name '" + name + "' - Competency was unsuccessful");
            ExtentReport.test.Log(LogStatus.Pass, name + " - Competency of same name has been created successfully and listed properly in the Competencies List Grid");
        }
        public string CreateCompetency(string type, bool isCreate)
        {
            Thread.Sleep(2000);
            if (isCreate)
            {
                AddCompetencyButton.Click();
                Thread.Sleep(6000);
            }

            string name = "Competency_" + DateTime.Now.ToString().Replace(' ', '_').Replace(':', '_').Replace('/', '_');

            PopupName_Textbox.Clear();
            PopupName_Textbox.SendKeys(name);

            PopupDescription_Textbox.Clear();
            PopupDescription_Textbox.SendKeys("Competency Description " + type);

            if (type == "Active")
            {
                PopupActiveYes_RadioButton.Click();
            }
            else//type will be InActive
            {
                PopupActiveNo_RadioButton.Click();
            }

            PopupSubmit_Button.Click();
            Thread.Sleep(3000);
            Assert.IsTrue(SuccessMessage.Displayed, name + " - " + type + " Competency is not " + formSubmitType + " successfully");
            ExtentReport.test.Log(LogStatus.Pass, "Success Message is displayed, " + name + " - " + type + " Competency " + formSubmitType + " successfully");

            return(name);
        }