public void previewInactiveOptions()
        {
            HomePage homepage = new HomePage(_driver);

            formTemplatepage  = new FormTemplatePage(_driver);
            ExtentReport.test = ExtentReport.extent.StartTest("previewInactiveOptions");
            DataRow dr = ExcelData.GetData_DataTable("EP_TESTDATA", "QuestionType", "KeyName", "AddQuestionType_01").Rows[0];

            formTemplatepage.addformtemplateQuestionnaireForm("FormTemplateTest", "FormType1");
            formTemplatepage.handleAddLocalQuestionMultiLineTextArea(dr[" Multi Line Text Area"].ToString(), dr["reference"].ToString(), dr["maxLength"].ToString(), dr["label"].ToString(), dr["required"].ToString(), dr["Readonly"].ToString());
            formTemplatepage.EperformEditButton.Click();
            BaseMethods.verifyWebElement(formTemplatepage.EperformReadOnlyYesRadioBtn, "The Inactive option is not displayed in local question", "The Inactive option is displayed in local question");


            formTemplatepage.EperformSubmitButton.Click();
            formTemplatepage.EperformPreviewFormLink.Click();
            IList <IWebElement> element = _driver.FindElements(By.Id("Dto_IsReadOnly_t"));

            if (element.Count != 0)
            {
                ExtentReport.test.Log(LogStatus.Pass, "The Inactive option is displayed in local question");
            }
            else
            {
                ExtentReport.test.Log(LogStatus.Pass, "The Inactive option is not displayed in local question");
            }

            formTemplatepage.EperformBackButton.Click();
        }
        public void changesMadeGlobalQuestionNotReflectedInFormTemplateDevelopmentActivityForm()
        {
            HomePage homepage = new HomePage(_driver);

            formTemplatepage  = new FormTemplatePage(_driver);
            ExtentReport.test = ExtentReport.extent.StartTest("changesMadeGlobalQuestionNotReflectedInFormTemplateDevelopmentActivityForm");
            DataRow dr = ExcelData.GetData_DataTable("EP_TESTDATA", "FormTemplateTest", "KeyName", "FormType2").Rows[0];

            homepage.EperformSystemConfigurationArrowIcon.Click();
            homepage.EperformFormTemplatesOption.Click();
            formTemplatepage.addFormTemplateDevelopmentActivityForm("FormTemplateTest", "FormType2");

            formTemplatepage.addGlobalQuestion("FormTemplateTest", "FormType1");

            homepage.EperformSystemConfigurationArrowIcon.Click();
            homepage.EperformGlobalQuestionsOption.Click();

            formTemplatepage.EperformFormTemplateSearchTextBox.SendKeys(dr["GlobalQuestionType"].ToString());
            formTemplatepage.EperformFormTemplateSearchButton.Click();
            formTemplatepage.EperformEditButton.Click();
            BaseMethods.webelementverify(formTemplatepage.EperformReferenceTestbox);
            formTemplatepage.EperformNoRadioButton.Click();
            formTemplatepage.EperformReferenceTestbox.Clear();
            DataRow data = ExcelData.GetData_DataTable("EP_TESTDATA", "QuestionType", "KeyName", "AddQuestionType_01").Rows[0];

            formTemplatepage.EperformReferenceTestbox.SendKeys(data["Change reference"].ToString());
            formTemplatepage.EperformSubmitButton.Click();
            homepage.EperformSystemConfigurationArrowIcon.Click();
            homepage.EperformFormTemplatesOption.Click();

            formTemplatepage.EperformFormTemplateSearchTextBox.SendKeys(dr["FormName"].ToString());
            formTemplatepage.EperformFormTemplateSearchButton.Click();
            var edittext = formTemplatepage.EperformEditButton;
            int count    = formTemplatepage.EperformEditListButton.Count();

            try
            {
                for (int i = 0; i < count; i++)
                {
                    formTemplatepage.EperformEditButton.Click();
                    if (formTemplatepage.EperformEditButton.Displayed)
                    {
                        formTemplatepage.EperformEditButton.Click();

                        BaseMethods.webelementverify(formTemplatepage.EperformReferenceTestbox);
                        break;
                    }
                    else
                    {
                        Thread.Sleep(3000);
                        _driver.Navigate().Back();
                    }
                }
            }
            catch
            {
                Thread.Sleep(3000);
                _driver.Navigate().Back();
            }
        }
        public void verifyActionscolumnMovingquestionsUpAndDownQuestionnaireForm()
        {
            try
            {
                HomePage homepage = new HomePage(_driver);
                formTemplatepage = new FormTemplatePage(_driver);
                SelectQuestionTypePage QTypePage = new SelectQuestionTypePage(_driver);
                ExtentReport.test = ExtentReport.extent.StartTest("verifyActionscolumnMovingquestionsUpAndDownQuestionnaireForm");
                DataRow dr = ExcelData.GetData_DataTable("EP_TESTDATA", "QuestionType", "KeyName", "AddQuestionType_01").Rows[0];
                formTemplatepage.addformtemplateQuestionnaireForm("FormTemplateTest", "FormType1");
                formTemplatepage.addGlobalQuestion("FormTemplateTest", "FormType1");
                formTemplatepage.handleAddLocalQuestionMultiLineTextArea(dr[" Multi Line Text Area"].ToString(), dr["reference"].ToString(), dr["maxLength"].ToString(), dr["label"].ToString(), dr["required"].ToString(), dr["Readonly"].ToString());
                BaseMethods.verifyWebElement(formTemplatepage.EperformGlobalQuestionDeleteButton, "Eperform GlobalQuestion Delete Button is not displayed in manage form", "Eperform GlobalQuestion Delete Button is displayed in manage form");
                BaseMethods.verifyWebElement(formTemplatepage.EperformEditButton, "Eperform Edit Button is not displayed in manage form", "Eperform Edit Button is displayed in manage form");
                BaseMethods.verifyWebElement(formTemplatepage.EperformDownButton, "Eperform Down Button is not displayed in manage form", "Eperform Down Button is displayed in manage form");
                BaseMethods.verifyWebElement(formTemplatepage.EperformUpButton, "Eperform Up Button is not displayed in manage form", "Eperform Up Button is displayed in manage form");
                formTemplatepage.EperformPreviewFormLink.Click();

                BaseMethods.webelementverify(formTemplatepage.EperformPreviewLinkTextformat);
                formTemplatepage.EperformBackButton.Click();
                System.Threading.Thread.Sleep(2000);
                formTemplatepage.EperformDownButton.Click();
                formTemplatepage.EperformPreviewFormLink.Click();
                BaseMethods.webelementverify(formTemplatepage.EperformPreviewLinkTextformat);
                formTemplatepage.EperformBackButton.Click();
            }
            catch
            {
                formTemplatepage.EperformBackButton.Click();
            }
        }
        public void EditDeleteQuestionnaireForm()
        {
            try
            {
                HomePage homepage = new HomePage(_driver);
                formTemplatepage = new FormTemplatePage(_driver);
                SelectQuestionTypePage QTypePage = new SelectQuestionTypePage(_driver);
                ExtentReport.test = ExtentReport.extent.StartTest("addquestionEditDeleteQuestionnaireForm");
                DataRow data = ExcelData.GetData_DataTable("EP_TESTDATA", "QuestionType", "KeyName", "AddQuestionType_01").Rows[0];

                String Text = data["reference"].ToString();
                formTemplatepage.questionnaireformEditSearch("FormTemplateTest", "FormType1");
                formTemplatepage.EperformReferenceTestbox.Clear();
                formTemplatepage.EperformReferenceTestbox.SendKeys(data["reference"].ToString());
                formTemplatepage.TxtLabel(data["label"].ToString());
                formTemplatepage.EperformReadOnlyYesRadioBtn.Click();
                formTemplatepage.EperformSubmitButton.Click();
                IWebElement EditChangeElement = _driver.FindElement(By.XPath("//td[contains(text(),'" + Text + "')]"));
                Assert.IsTrue(EditChangeElement.Displayed, "Eperform Add question Button is not displayed in manage form");
                ExtentReport.test.Log(LogStatus.Pass, Text + "is displayed in manage form");
                BaseMethods.verifyWebElement(formTemplatepage.EperformGlobalQuestionDeleteButton, "Eperform GlobalQuestion Delete Button is not displayed in manage form", "Eperform GlobalQuestion Delete Button is displayed in manage form");

                formTemplatepage.EperformGlobalQuestionDeleteButton.Click();
                formTemplatepage.EperformAddQuestionOkButton.Click();
            }
            catch
            {
                formTemplatepage.EperformBackButton.Click();
            }
        }
        public void addFormTemplatesGobalQuestionDevelopmentActivityForm()
        {
            try
            {
                ExtentReport.test = ExtentReport.extent.StartTest("addFormTemplatesGobalQuestionDevelopmentActivityForm");
                formTemplatepage  = new FormTemplatePage(_driver);
                formTemplatepage.addFormTemplateDevelopmentActivityForm("FormTemplateTest", "FormType2");

                BaseMethods.verifyWebElement(formTemplatepage.EperformReferenceText, "Eperform Reference Text is not displayed in manage form", "Eperform Reference Text is displayed in manage form");
                BaseMethods.verifyWebElement(formTemplatepage.EperformQuestionText, "Eperform Question Text is not displayed in manage form", "Eperform Question Text is displayed in manage form");
                BaseMethods.verifyWebElement(formTemplatepage.EperformTypeText, "Eperform Type Text is not displayed in manage form", "Eperform Type Text  is displayed in manage form");
                BaseMethods.verifyWebElement(formTemplatepage.EperformMandatoryText, "Eperform Mandatory Text is not displayed in manage form", "Eperform Mandatory Text  is displayed in manage form");
                BaseMethods.verifyWebElement(formTemplatepage.EperfromActionsText, "Eperfrom Actions Text is not displayed in manage form", "Eperfrom Actions Text  is displayed in manage form");
                BaseMethods.verifyWebElement(formTemplatepage.EperformPreviewFormLink, "Eperform PreviewForm Link is not displayed in manage form", "Eperform PreviewForm Link  is displayed in manage form");

                formTemplatepage.EperformPreviewFormLink.Click();
                System.Threading.Thread.Sleep(5000);
                BaseMethods.webelementverify(formTemplatepage.EperformPreviewFormText);

                formTemplatepage.EperformBackButton.Click();

                formTemplatepage.addGlobalQuestion("FormTemplateTest", "FormType2");
                formTemplatepage.EperformPreviewFormLink.Click();

                BaseMethods.webelementverify(formTemplatepage.EperformGobalQuestionText);
                formTemplatepage.EperformBackButton.Click();
            }
            catch (Exception e)
            {
                formTemplatepage.EperformBackButton.Click();
            }
        }
        public void verifyManageFormPage()
        {
            HomePage homepage = new HomePage(_driver);

            formTemplatepage  = new FormTemplatePage(_driver);
            ExtentReport.test = ExtentReport.extent.StartTest("verifyManageFormPage");
            homepage.EperformSystemConfigurationArrowIcon.Click();
            homepage.EperformFormTemplatesOption.Click();
            formTemplatepage.EperformAddFormTemplateButton.Click();
            BaseMethods.verifyWebElement(formTemplatepage.EperformManageFormText, "Eperform ManageForm Text is not displayed", "Eperform ManageForm Text is displayed");
            BaseMethods.webelementverify(formTemplatepage.EperformDenotesamandatoryfieldText);
            BaseMethods.webelementverify(formTemplatepage.EperformManageFormNameText);
            BaseMethods.webelementverify(formTemplatepage.EperformManageFormIsActiveText);
            BaseMethods.webelementverify(formTemplatepage.EperformManageFormFormTypeText);
            BaseMethods.webelementverify(formTemplatepage.EperformYesText);
            BaseMethods.webelementverify(formTemplatepage.EperformNoText);
            BaseMethods.webelementverify(formTemplatepage.EperformSubmitButton);
            BaseMethods.webelementverify(formTemplatepage.EperformCancelButton);
            formTemplatepage.EperformSelectformtype.Click();
            foreach (IWebElement element in formTemplatepage.EperformFormTypeList)
            {
                Assert.IsTrue(element.Displayed,
                              element.Text + " is not dispalyed");
                ExtentReport.test.Log(LogStatus.Pass, element.Text + "is displayed in manage form");
            }
        }
        public void inactiveGlobalQuestionsFormTemplate()
        {
            HomePage homepage = new HomePage(_driver);

            formTemplatepage  = new FormTemplatePage(_driver);
            ExtentReport.test = ExtentReport.extent.StartTest("inactiveGlobalQuestionsFormTemplate");
            DataRow dr = ExcelData.GetData_DataTable("EP_TESTDATA", "FormTemplateTest", "KeyName", "FormType1").Rows[0];

            homepage.EperformSystemConfigurationArrowIcon.Click();
            homepage.EperformGlobalQuestionsOption.Click();

            formTemplatepage.EperformFormTemplateSearchTextBox.SendKeys(dr["GlobalQuestionType"].ToString());
            formTemplatepage.EperformFormTemplateSearchButton.Click();

            formTemplatepage.EperformEditButton.Click();

            formTemplatepage.EperformNoRadioButton.Click();
            formTemplatepage.EperformSubmitButton.Click();

            homepage.EperformSystemConfigurationArrowIcon.Click();
            homepage.EperformFormTemplatesOption.Click();

            formTemplatepage.EperformFormTemplateSearchTextBox.SendKeys(dr["GlobalQuestionType"].ToString());
            formTemplatepage.EperformFormTemplateSearchButton.Click();
            BaseMethods.webelementverify(_driver.FindElement(By.Id("NoListRecords")));
        }
 public void verifyManageDocumentPageInvalidValue()
 {
     try
     {
         ExtentReport.test = ExtentReport.extent.StartTest("Verify Mange Document Page for invalid value");
         LoginPage login = new LoginPage(_driver);
         HomePage  home  = new HomePage(_driver);
         formtemplate = new FormTemplatePage(_driver);
         ReferenceMaterialPage referenceMaterialPage = new ReferenceMaterialPage(_driver);
         home.EperformReferenceMaterialArrowIcon.Click();
         home.EperformDocumentsOption.Click();
         System.Threading.Thread.Sleep(2000);
         BaseMethods.verifyWebElement(referenceMaterialPage.EperformAddDocumentButton, "Eperform AddDocument Button is not displayed", "Eperform AddDocument Button is displayed");
         referenceMaterialPage.EperformAddDocumentButton.Click();
         System.Threading.Thread.Sleep(3000);
         login.EperformSubmitButton.Click();
         System.Threading.Thread.Sleep(3000);
         BaseMethods.verifyWebElement(referenceMaterialPage.EperformNameBlankErrorMessage, "The Name field is required. is not displayed in Mange Document Page", "The Name field is required. is displayed Mange Document Page");
         BaseMethods.verifyWebElement(referenceMaterialPage.EperformFileBlankErrorMessage, "The File field is required. is not displayed in Mange Document Page", "The File field is required. is displayed Mange Document Page");
         System.Threading.Thread.Sleep(3000);
         formtemplate.EperformCancelButton.Click();
         System.Threading.Thread.Sleep(2000);
     }
     catch
     {
         formtemplate.EperformCancelButton.Click();
     }
 }
        public void multiSelectSingleSelectLocalQuestionsActiveInactiveFormTemplate()
        {
            HomePage homepage = new HomePage(_driver);

            formTemplatepage  = new FormTemplatePage(_driver);
            ExtentReport.test = ExtentReport.extent.StartTest("multiSelectSingleSelectLocalQuestionsActiveInactiveFormTemplate");

            homepage.EperformSystemConfigurationArrowIcon.Click();
            homepage.EperformFormTemplatesOption.Click();
            formTemplatepage.addformtemplateQuestionnaireForm("FormTemplateTest", "FormType1");
            DataRow dr = ExcelData.GetData_DataTable("EP_TESTDATA", "QuestionType", "KeyName", "AddQuestionType_01").Rows[0];

            formTemplatepage.EperformAddquestionButton.Click();
            formTemplatepage.handleLocalQuestionSingleLineTextBox(dr["Single Line Text Box"].ToString(), dr["reference"].ToString(), dr["label"].ToString(), dr["required"].ToString(), dr["Readonly"].ToString());
            formTemplatepage.EperformEditButton.Click();
            formTemplatepage.EperformOptionsIcon.Click();
            BaseMethods.verifyWebElement(formTemplatepage.EperformAddOptionButton, "Add Option Button is not displayed", "Add Option Button is displayed");
            formTemplatepage.EperformAddOptionButton.Click();
            formTemplatepage.EperformOptionTextBox.SendKeys(dr["OptionTextBox"].ToString());
            formTemplatepage.EperformSubmitButton.Click();
            BaseMethods.webelementverify(formTemplatepage.EperformOptionYesText);
            Assert.IsTrue(formTemplatepage.EperformOptionYesText.Displayed, "Active Yes text is not displayed");
            ExtentReport.test.Log(LogStatus.Pass, formTemplatepage.EperformOptionYesText.Text + "is displayed");
            formTemplatepage.EperformEditButton.Click();
            formTemplatepage.EperformNoRadioButton.Click();
            formTemplatepage.EperformSubmitButton.Click();
            BaseMethods.webelementverify(formTemplatepage.EperformOptionYesText);
        }
        public void verifyGoalElementpage()
        {
            ExtentReport.test = ExtentReport.extent.StartTest("verifyGoalElementpage");
            ArrayList             list                           = BaseClass.GetData("EP_TESTDATA", "ReferencePillar", "KeyName", "ReferncePillar_01");
            LoginPage             login                          = new LoginPage(_driver);
            HomePage              home                           = new HomePage(_driver);
            FormTemplatePage      formtemplate                   = new FormTemplatePage(_driver);
            ReferenceMaterialPage referenceMaterialPage          = new ReferenceMaterialPage(_driver);
            ReferenceMaterialPageDevelopmentActivities reference = new ReferenceMaterialPageDevelopmentActivities(_driver);
            ReferenceMaterialPagePillars referencePillars        = new ReferenceMaterialPagePillars(_driver);
            ReferenceMaterialPageGoal    referenceGoals          = new ReferenceMaterialPageGoal(_driver);

            referenceGoals.gotoGoalPage();
            BaseMethods.webelementverify(referenceGoals.EperformGoalsText);
            BaseMethods.webelementverify(referenceGoals.EperformShowAdvancedSearchButton);
            BaseMethods.verifyWebElement(reference.EperformSearchButton, "Search Button is not displayed", "Search Button is displayed");
            BaseMethods.webelementverify(referenceGoals.EperformKeywordText);
            BaseMethods.verifyWebElement(formtemplate.EperformGlobalQuestionsSearchTextBox, "Search textbox is not displayed", "Search Textbox is displayed");
            BaseMethods.verifyWebElement(referenceGoals.EperformAddGoalButton, "Add Goal button is not displayed", "Add Goal button is displayed");
            BaseMethods.verifyWebElement(referenceGoals.EperformCustomiseText, "Customise Text is not displayed", "Customise Text is displayed");
            referenceGoals.goalHomeVerifySortableText("Name");
            referenceGoals.goalHomeVerifySortableText("Type");
            referenceGoals.goalHomeVerifySortableText("Pillar");
            referenceGoals.goalHomeVerifySortableText("Active");
            referenceGoals.goalHomeVerifySortableText("Actions");
            referenceGoals.customiseoption();
        }
        public void verifyQuestionRoleSubmitPreviewLink()
        {
            try
            {
                HomePage homepage = new HomePage(_driver);
                formTemplatepage  = new FormTemplatePage(_driver);
                ExtentReport.test = ExtentReport.extent.StartTest("verifyQuestionRoleSubmitPreviewLink");
                DataRow dr = ExcelData.GetData_DataTable("EP_TESTDATA", "QuestionType", "KeyName", "AddQuestionType_01").Rows[0];
                formTemplatepage.addformtemplateQuestionnaireForm("FormTemplateTest", "FormType1");
                formTemplatepage.addGlobalQuestion("FormTemplateTest", "FormType1");
                formTemplatepage.handleAddLocalQuestionMultiLineTextArea(dr[" Multi Line Text Area"].ToString(), dr["reference"].ToString(), dr["maxLength"].ToString(), dr["label"].ToString(), dr["required"].ToString(), dr["Readonly"].ToString());
                DataRow data = ExcelData.GetData_DataTable("EP_TESTDATA", "RoleType", "KeyName", "RoleType_01").Rows[0];
                formTemplatepage.filledByRoles(data["RoleType"].ToString());
                formTemplatepage.EperformPreviewFormLink.Click();
                formTemplatepage.EperformPreviewFormAsDropdownIcon.Click();
                BaseMethods.DdlSelectByText(formTemplatepage.EperformPreviewFormAsDropdownIcon, data["RoleType"].ToString());
                Assert.IsTrue(formTemplatepage.EperformPreviewLinkTextformat.Displayed, "Eperform PreviewName Text not displayed");
                ExtentReport.test.Log(LogStatus.Pass, formTemplatepage.EperformPreviewLinkTextformat.Text + "is displayed before selecting Preview form");

                formTemplatepage.EperformPreviewFormAsDropdownIcon.Click();
                BaseMethods.DdlSelectByText(formTemplatepage.EperformPreviewFormAsDropdownIcon, data["RoleType"].ToString());
                Assert.IsTrue(formTemplatepage.EperformPreviewNameText.Displayed, "Eperform PreviewName Text not displayed");
                ExtentReport.test.Log(LogStatus.Pass, formTemplatepage.EperformPreviewNameText.Text + "is displayed After selecting Preview form");
                formTemplatepage.EperformBackButton.Click();
            }
            catch
            {
                formTemplatepage.EperformBackButton.Click();
            }
        }
        public void verifyPillarsPage()
        {
            ExtentReport.test = ExtentReport.extent.StartTest("verifyPillarsPage");

            LoginPage             login                          = new LoginPage(_driver);
            HomePage              home                           = new HomePage(_driver);
            FormTemplatePage      formtemplate                   = new FormTemplatePage(_driver);
            ReferenceMaterialPage referenceMaterialPage          = new ReferenceMaterialPage(_driver);
            ReferenceMaterialPageDevelopmentActivities reference = new ReferenceMaterialPageDevelopmentActivities(_driver);
            ReferenceMaterialPagePillars referencePillars        = new ReferenceMaterialPagePillars(_driver);

            home.EperformReferenceMaterialArrowIcon.Click();
            home.EperformPillarsOption.Click();
            BaseMethods.webelementverify(referencePillars.PillarText);
            BaseMethods.webelementverify(referencePillars.PillarNameText);
            BaseMethods.webelementverify(referencePillars.PillarDescriptionText);
            BaseMethods.webelementverify(referencePillars.PillarActiveText);
            BaseMethods.webelementverify(referencePillars.PillarActionsText);
            BaseMethods.webelementverify(reference.EperformEditButton);
            BaseMethods.verifyWebElement(referencePillars.AddPillarButton, "Add Pillar button is not displayed", "Add Pillar button is  displayed");
            referencePillars.AddPillarButton.Click();
            BaseMethods.webelementverify(referenceMaterialPage.EperformNameText);
            BaseMethods.webelementverify(referenceMaterialPage.EperformDescriptionText);
            BaseMethods.webelementverify(referenceMaterialPage.EperformIsActiveText);
            BaseMethods.verifyWebElement(reference.EperformSubmit, "Pillar submit button is not displayed", "Pillar submit button is  displayed");
            BaseMethods.verifyWebElement(formtemplate.EperformCancelButton, "Pillar cancel button is not displayed", "Pillar cancel button is displayed");
            BaseMethods.webelementverify(referencePillars.PillarManagePillarText);
            reference.EperformSubmit.Click();
            BaseMethods.webelementverify(referencePillars.errorMessageName);
            formtemplate.EperformCancelButton.Click();
        }
        public void MultiSelectSingleSelectGlobalQuestionsCannotActiveInactiveFormTemplate()
        {
            HomePage homepage = new HomePage(_driver);

            formTemplatepage  = new FormTemplatePage(_driver);
            ExtentReport.test = ExtentReport.extent.StartTest("MultiSelectSingleSelectGlobalQuestionsCannotActiveInactiveFormTemplate");
            homepage.EperformSystemConfigurationArrowIcon.Click();
            homepage.EperformGlobalQuestionsOption.Click();
            formTemplatepage.BtnAddGlobalQuestion.Click();
            formTemplatepage.RdoSingleItemSelect.Click();
            formTemplatepage.EperformSubmitButton.Click();
            BaseMethods.verifyWebElement(formTemplatepage.EperformGobalQuestionActiveText, "Active/Inactive text is not displayed", "Active/Inactive text is  displayed");
            BaseMethods.Navigate_Back(_driver);
            formTemplatepage.EperformCancelButton.Click();
            formTemplatepage.BtnAddGlobalQuestion.Click();
            formTemplatepage.EperformRdoMultiLineTextArea.Click();
            formTemplatepage.EperformSubmitButton.Click();
            BaseMethods.verifyWebElement(formTemplatepage.EperformGobalQuestionActiveText, "Active/Inactive text is not displayed", "Active/Inactive text is  displayed");
            formTemplatepage.EperformCancelButton.Click();
            formTemplatepage.addformtemplateQuestionnaireForm("FormTemplateTest", "FormType1");
            formTemplatepage.addGlobalQuestion("FormTemplateTest", "FormType1");
            formTemplatepage.EperformEditButton.Click();
            IList <IWebElement> element = _driver.FindElements(By.XPath("//label[contains(text(),'Active')]"));

            if (element.Count != 0)
            {
                ExtentReport.test.Log(LogStatus.Pass, "The Active/Inacive option is displayed in local question");
            }
            else
            {
                ExtentReport.test.Log(LogStatus.Pass, "The Active/Inacive option is not displayed in local question");
            }
        }
 public void sortableNameActiveSearchFunctionally()
 {
     try
     {
         HomePage homepage = new HomePage(_driver);
         formTemplatepage = new FormTemplatePage(_driver);
         SelectQuestionTypePage QTypePage = new SelectQuestionTypePage(_driver);
         ExtentReport.test = ExtentReport.extent.StartTest("SortableNameActiveSearchFunctionally");
         DataRow data = ExcelData.GetData_DataTable("EP_TESTDATA", "FormTemplateTest", "KeyName", "FormType1").Rows[0];
         homepage.EperformSystemConfigurationArrowIcon.Click();
         homepage.EperformFormTemplatesOption.Click();
         BaseMethods.webelementverify(formTemplatepage.EperformNameText);
         BaseMethods.webelementverify(formTemplatepage.EperformNameSortText);
         formTemplatepage.EperformNameText.Click();
         BaseMethods.webelementverify(formTemplatepage.EperformNameSortText);
         BaseMethods.verifyWebElement(formTemplatepage.EperformActiveText, "Eperform Active Text is not displayed in form template page", "Eperform Active Text is displayed in form template page");
         BaseMethods.webelementverify(formTemplatepage.EperformActiveSortText);
         formTemplatepage.EperformActiveText.Click();
         BaseMethods.webelementverify(formTemplatepage.EperformActiveSortText);
         formTemplatepage.EperformFormTemplateSearchTextBox.SendKeys(data["FormName"].ToString());
         formTemplatepage.EperformFormTemplateSearchButton.Click();
         BaseMethods.webelementverify(formTemplatepage.EperformNameSortText);
     }
     catch
     {
         formTemplatepage.EperformBackButton.Click();
     }
 }
 public void verifyManageDocumentPage()
 {
     try
     {
         ExtentReport.test = ExtentReport.extent.StartTest("Verify Mange Document Page for invalid value");
         LoginPage login = new LoginPage(_driver);
         HomePage  home  = new HomePage(_driver);
         formtemplate = new FormTemplatePage(_driver);
         ReferenceMaterialPage referenceMaterialPage = new ReferenceMaterialPage(_driver);
         home.EperformReferenceMaterialArrowIcon.Click();
         home.EperformDocumentsOption.Click();
         System.Threading.Thread.Sleep(2000);
         referenceMaterialPage.EperformAddDocumentButton.Click();
         System.Threading.Thread.Sleep(2000);
         BaseMethods.webelementverify(referenceMaterialPage.EperformNameText);
         BaseMethods.webelementverify(referenceMaterialPage.EperformFileText);
         BaseMethods.webelementverify(referenceMaterialPage.EperformCategotyText);
         BaseMethods.webelementverify(referenceMaterialPage.EperformDescriptionText);
         BaseMethods.webelementverify(referenceMaterialPage.EperformIsActiveText);
         formtemplate.EperformCancelButton.Click();
         System.Threading.Thread.Sleep(2000);
     }
     catch
     {
         formtemplate.EperformCancelButton.Click();
     }
 }
        public void createEditPillars()
        {
            ExtentReport.test = ExtentReport.extent.StartTest("createEditPillars");

            LoginPage                    login            = new LoginPage(_driver);
            HomePage                     home             = new HomePage(_driver);
            FormTemplatePage             formtemplate     = new FormTemplatePage(_driver);
            ReferenceMaterialPagePillars referencePillars = new ReferenceMaterialPagePillars(_driver);

            referencePillars.createEditpillar("ReferencePillar", "ReferncePillar_01");
        }
        public void editSearchDevelopmentActivity()
        {
            ExtentReport.test = ExtentReport.extent.StartTest("editSearchDevelopmentActivity");

            LoginPage             login                          = new LoginPage(_driver);
            HomePage              home                           = new HomePage(_driver);
            FormTemplatePage      formtemplate                   = new FormTemplatePage(_driver);
            ReferenceMaterialPage referenceMaterialPage          = new ReferenceMaterialPage(_driver);
            ReferenceMaterialPageDevelopmentActivities reference = new ReferenceMaterialPageDevelopmentActivities(_driver);

            reference.editDevelopmentActivity("DevelopmentActivityForm", "DevelopmentActivityform_01");
        }
        public void createDevelopmentActiveInactive()
        {
            ExtentReport.test = ExtentReport.extent.StartTest("verifyDevelopmentActivityPage");

            LoginPage             login                          = new LoginPage(_driver);
            HomePage              home                           = new HomePage(_driver);
            FormTemplatePage      formtemplate                   = new FormTemplatePage(_driver);
            ReferenceMaterialPage referenceMaterialPage          = new ReferenceMaterialPage(_driver);
            ReferenceMaterialPageDevelopmentActivities reference = new ReferenceMaterialPageDevelopmentActivities(_driver);

            reference.addDevelopmentActivity("DevelopmentActivityForm", "DevelopmentActivityform_01");
        }
        public void sortablePillarsPage()
        {
            ExtentReport.test = ExtentReport.extent.StartTest("sortablePillarsPage");

            LoginPage                    login            = new LoginPage(_driver);
            HomePage                     home             = new HomePage(_driver);
            FormTemplatePage             formtemplate     = new FormTemplatePage(_driver);
            ReferenceMaterialPagePillars referencePillars = new ReferenceMaterialPagePillars(_driver);

            home.EperformReferenceMaterialArrowIcon.Click();
            home.EperformPillarsOption.Click();
            referencePillars.sortablepillarpage();
        }
        public void createactiveinactiveGoal()
        {
            ExtentReport.test = ExtentReport.extent.StartTest("verifyGoalElementpage");
            ArrayList             list                           = BaseClass.GetData("EP_TESTDATA", "ReferencePillar", "KeyName", "ReferncePillar_01");
            LoginPage             login                          = new LoginPage(_driver);
            HomePage              home                           = new HomePage(_driver);
            FormTemplatePage      formtemplate                   = new FormTemplatePage(_driver);
            ReferenceMaterialPage referenceMaterialPage          = new ReferenceMaterialPage(_driver);
            ReferenceMaterialPageDevelopmentActivities reference = new ReferenceMaterialPageDevelopmentActivities(_driver);
            ReferenceMaterialPagePillars referencePillars        = new ReferenceMaterialPagePillars(_driver);
            ReferenceMaterialPageGoal    referenceGoals          = new ReferenceMaterialPageGoal(_driver);

            referenceGoals.gotoGoalPage();
            referenceGoals.EperformAddGoalButton.Click();
            referenceGoals.createGoal("ReferenceGoals", "ReferenceGoals_01");
        }
        public void CancelButtonManageForm()
        {
            HomePage homepage = new HomePage(_driver);

            formTemplatepage  = new FormTemplatePage(_driver);
            ExtentReport.test = ExtentReport.extent.StartTest("CancelButtonManageForm");
            DataRow data = ExcelData.GetData_DataTable("ER_TESTDATA", "HomePagesVerify", "KeyName", "Homepage_08").Rows[0];

            homepage.EperformSystemConfigurationArrowIcon.Click();
            homepage.EperformFormTemplatesOption.Click();
            BaseMethods.verifyWebElement(formTemplatepage.EperformAddFormTemplateButton, "Eperform AddFormTemplate Button is not displayed in the Form Template page", "Eperform AddFormTemplate Button  is displayed in the Form Template page");
            formTemplatepage.EperformAddFormTemplateButton.Click();
            BaseMethods.verifyWebElement(formTemplatepage.EperformCancelButton, "Eperform Cancel Button is not displayed in the Manage form page", "Eperform Cancel Button is displayed in the Manage form page");
            formTemplatepage.EperformCancelButton.Click();
            homepage.pageverify(data["HomeSystemConfigurationPage"].ToString());
        }
        public void sameDevelopmentActivity()
        {
            ExtentReport.test = ExtentReport.extent.StartTest("sameDevelopmentActivity");

            LoginPage             login                          = new LoginPage(_driver);
            HomePage              home                           = new HomePage(_driver);
            FormTemplatePage      formtemplate                   = new FormTemplatePage(_driver);
            ReferenceMaterialPage referenceMaterialPage          = new ReferenceMaterialPage(_driver);
            ReferenceMaterialPageDevelopmentActivities reference = new ReferenceMaterialPageDevelopmentActivities(_driver);

            reference.addDevelopmentActivity("DevelopmentActivityForm", "DevelopmentActivityform_02");
            reference.addDevelopmentActivity("DevelopmentActivityForm", "DevelopmentActivityform_02");
            ArrayList list2 = BaseClass.GetData("EP_TESTDATA", "DevelopmentActivityForm", "KeyName", "DevelopmentActivityform_02");

            reference.search(list2[1].ToString());
            BaseMethods.webelementverify(reference.NameText);
        }
        public void verifyManageDevelopmentActivity()
        {
            try
            {
                ExtentReport.test = ExtentReport.extent.StartTest("verifyDevelopmentActivityPage");

                LoginPage             login                          = new LoginPage(_driver);
                HomePage              home                           = new HomePage(_driver);
                FormTemplatePage      formtemplate                   = new FormTemplatePage(_driver);
                ReferenceMaterialPage referenceMaterialPage          = new ReferenceMaterialPage(_driver);
                ReferenceMaterialPageDevelopmentActivities reference = new ReferenceMaterialPageDevelopmentActivities(_driver);
                home.EperformReferenceMaterialArrowIcon.Click();
                home.EperformDevelopmentActivitiesOption.Click();
                System.Threading.Thread.Sleep(3000);
                foreach (IWebElement element in reference.EPerformEditButtonList)
                {
                    BaseMethods.webelementverify(element);
                }
                System.Threading.Thread.Sleep(2000);
                referenceMaterialPage.EperformAddDevelopmentActivityButton.Click();
                System.Threading.Thread.Sleep(4000);
                BaseMethods.verifyWebElement(reference.EperformpillarsSelectText, "PleaseSelect text is not displayed Defaults", "PleaseSelect text is displayed Defaults");
                reference.EperformPillarDropDownIcon.Click();
                System.Threading.Thread.Sleep(2000);

                foreach (IWebElement element in reference.EperformPillarDropDownList)
                {
                    BaseMethods.webelementverify(element);
                }
                reference.EperformSubmit.Click();
                System.Threading.Thread.Sleep(2000);
                BaseMethods.webelementverify(reference.EperformErrorMessage);
                foreach (IWebElement element in reference.EperformRequiredErrorMessage)
                {
                    BaseMethods.webelementverify(element);
                }
                System.Threading.Thread.Sleep(2000);
                formtemplate.EperformCancelButton.Click();
                System.Threading.Thread.Sleep(2000);
            }
            catch
            {
                formtemplate.EperformCancelButton.Click();
            }
        }
        public void addquestionQuestionnaireForm()
        {
            try
            {
                HomePage homepage = new HomePage(_driver);
                formTemplatepage = new FormTemplatePage(_driver);
                SelectQuestionTypePage QTypePage = new SelectQuestionTypePage(_driver);
                ExtentReport.test = ExtentReport.extent.StartTest("addquestionQuestionnaireForm");
                DataRow data = ExcelData.GetData_DataTable("EP_TESTDATA", "FormTemplateTest", "KeyName", "FormType1").Rows[0];

                homepage.EperformSystemConfigurationArrowIcon.Click();
                homepage.EperformFormTemplatesOption.Click();
                formTemplatepage.EperformAddFormTemplateButton.Click();
                formTemplatepage.EperformNameTextBox.SendKeys(data["Form Type"].ToString());
                formTemplatepage.EperformYesRadioButton.Click();
                formTemplatepage.EperformSelectformtype.Click();
                BaseMethods.DdlSelectByValue(formTemplatepage.EperformSelectformtype, data["Form Type"].ToString());
                formTemplatepage.EperformSubmitButton.Click();
                formTemplatepage.verifyFormType("ePeform Questionnaire Form");
                formTemplatepage.EperformSubmitButton.Click();
                formTemplatepage.EperformPreviewFormLink.Click();
                formTemplatepage.EperformPreviewFormAsDropdownIcon.Click();
                Thread.Sleep(2000);
                foreach (IWebElement element in formTemplatepage.EperformPreviewFormasList)
                {
                    BaseMethods.webelementverify(element);
                }

                formTemplatepage.EperformBackButton.Click();
                Thread.Sleep(2000);
                Assert.IsTrue(formTemplatepage.EperformAddquestionButton.Displayed, "Eperform Add question Button is not displayed in manage form");
                ExtentReport.test.Log(LogStatus.Pass, " Eperform Add question Button is displayed in manage form");
                formTemplatepage.EperformAddquestionButton.Click();
                formTemplatepage.createLocalQuestion();
                formTemplatepage.EperformPreviewFormLink.Click();
                BaseMethods.webelementverify(formTemplatepage.EperformPreviewLinkNameText);
                formTemplatepage.EperformBackButton.Click();
            }
            catch
            {
                formTemplatepage.EperformBackButton.Click();
            }
        }
        public void addFormTemplatesGobalQuestionQuestionnaireForm()
        {
            try
            {
                ExtentReport.test = ExtentReport.extent.StartTest("addFormTemplatesGobalQuestionQuestionnaireForm");
                formTemplatepage  = new FormTemplatePage(_driver);
                formTemplatepage.addformtemplateQuestionnaireForm("FormTemplateTest", "FormType1");

                BaseMethods.verifyWebElement(formTemplatepage.EperformReferenceText, "Eperform Reference Text is not displayed in manage form", "Eperform Reference Text is displayed in manage form");
                BaseMethods.verifyWebElement(formTemplatepage.EperformQuestionText, "Eperform Question Text is not displayed in manage form", "Eperform Question Text is displayed in manage form");
                BaseMethods.verifyWebElement(formTemplatepage.EperformTypeText, "Eperform Type Text is not displayed in manage form", "Eperform Type Text  is displayed in manage form");
                BaseMethods.verifyWebElement(formTemplatepage.EperfromMandatoryText, "Eperfrom Mandatory Text is not displayed in manage form", "Eperfrom Mandatory Text  is displayed in manage form");
                BaseMethods.verifyWebElement(formTemplatepage.EperfromActionsText, "Eperfrom Actions Text is not displayed in manage form", "Eperfrom Actions Text  is displayed in manage form");
                BaseMethods.verifyWebElement(formTemplatepage.EperformPreviewFormLink, "Eperform PreviewForm Link is not displayed in manage form", "Eperform PreviewForm Link  is displayed in manage form");

                formTemplatepage.EperformPreviewFormLink.Click();

                formTemplatepage.EperformPreviewFormAsDropdownIcon.Click();
                foreach (IWebElement element in formTemplatepage.EperformGobalQuestionNameTEXT)
                {
                    ExtentReport.test.Log(LogStatus.Pass, element.Text + "is displayed in manage form");
                }

                formTemplatepage.EperformBackButton.Click();


                formTemplatepage.addGlobalQuestion("FormTemplateTest", "FormType1");

                formTemplatepage.EperformPreviewFormLink.Click();


                foreach (IWebElement element in formTemplatepage.EperformGobalQuestionNameTEXT)
                {
                    ExtentReport.test.Log(LogStatus.Pass, element.Text + "is displayed in manage form");
                }
                formTemplatepage.EperformBackButton.Click();
            }
            catch (Exception e)
            {
                formTemplatepage.EperformBackButton.Click();
            }
        }
        public void verifyMovingquestionsUpAndDownDevelopmentActivityForm()
        {
            HomePage homepage = new HomePage(_driver);

            formTemplatepage = new FormTemplatePage(_driver);
            SelectQuestionTypePage QTypePage = new SelectQuestionTypePage(_driver);

            ExtentReport.test = ExtentReport.extent.StartTest("verifyMovingquestionsUpAndDownDevelopmentActivityForm");
            formTemplatepage.addFormTemplateDevelopmentActivityForm("FormTemplateTest", "FormType2");
            formTemplatepage.addGlobalQuestion("FormTemplateTest", "FormType2");
            formTemplatepage.addGlobalQuestion("FormTemplateTest", "FormType3");
            formTemplatepage.EperformPreviewFormLink.Click();
            BaseMethods.webelementverify(formTemplatepage.EperformGobalQuestionText);
            formTemplatepage.EperformBackButton.Click();
            Thread.Sleep(2000);
            formTemplatepage.EperformDownButton.Click();
            formTemplatepage.EperformPreviewFormLink.Click();
            BaseMethods.webelementverify(formTemplatepage.EperformGobalQuestionText);
            formTemplatepage.EperformBackButton.Click();
        }
        public void questionnaireFormTemplateToInactive()
        {
            HomePage homepage = new HomePage(_driver);

            formTemplatepage  = new FormTemplatePage(_driver);
            ExtentReport.test = ExtentReport.extent.StartTest("questionnaireFormTemplateToInactive");
            homepage.EperformSystemConfigurationArrowIcon.Click();
            homepage.EperformFormTemplatesOption.Click();
            Assert.IsTrue(formTemplatepage.EperformActiveSortText.Displayed, "Active Text is not displayed");
            ExtentReport.test.Log(LogStatus.Pass, formTemplatepage.EperformActiveSortText.Text + "Before change to inactive");
            formTemplatepage.EperformEditButton.Click();
            BaseMethods.webelementverify(formTemplatepage.EperformComponentTypeText);
            formTemplatepage.EperformNoRadioButton.Click();
            formTemplatepage.EperformSubmitButton.Click();
            homepage.EperformSystemConfigurationArrowIcon.Click();
            homepage.EperformFormTemplatesOption.Click();
            formTemplatepage.EperformFormTemplateSearchTextBox.SendKeys(formTemplatepage.EperformGlobalQuestionAddedText.Text);
            formTemplatepage.EperformFormTemplateSearchButton.Click();
            Assert.IsTrue(formTemplatepage.EperformActiveSortText.Displayed, "Active Text is not displayed");
            ExtentReport.test.Log(LogStatus.Pass, formTemplatepage.EperformActiveSortText.Text + "After change to inactive");
        }
 public void verifyDevelopmentActivityPage()
 {
     try
     {
         ExtentReport.test = ExtentReport.extent.StartTest("verifyDevelopmentActivityPage");
         ArrayList list  = BaseClass.GetData("EP_TESTDATA", "HomePagesVerify", "KeyName", "Homepage_04");
         LoginPage login = new LoginPage(_driver);
         HomePage  home  = new HomePage(_driver);
         formtemplate = new FormTemplatePage(_driver);
         ReferenceMaterialPage referenceMaterialPage          = new ReferenceMaterialPage(_driver);
         ReferenceMaterialPageDevelopmentActivities reference = new ReferenceMaterialPageDevelopmentActivities(_driver);
         home.EperformReferenceMaterialArrowIcon.Click();
         home.EperformDevelopmentActivitiesOption.Click();
         System.Threading.Thread.Sleep(3000);
         BaseMethods.verifyWebElement(formtemplate.EperformFormTemplateSearchTextBox, "Search textbox is not displayed", "Search textbox is displayed");
         BaseMethods.verifyWebElement(formtemplate.EperformFormTemplateSearchButton, "Search button is not displayed", "Search Button is displayed");
         BaseMethods.verifyWebElement(referenceMaterialPage.EperformAddDevelopmentActivityButton, "Eperform AddDevelopmentActivity Button is not displayed", "Eperform AddDevelopmentActivity Button is displayed");
         System.Threading.Thread.Sleep(2000);
         referenceMaterialPage.EperformAddDevelopmentActivityButton.Click();
         System.Threading.Thread.Sleep(2000);
         BaseMethods.verifyWebElement(referenceMaterialPage.EperformManageDevelopmentActivityText, "Eperform ManageDevelopment Activity Text is not displayed", "Eperform Manage Development Activity Text is displayed");
         BaseMethods.webelementverify(referenceMaterialPage.EperformNameText);
         BaseMethods.webelementverify(reference.EperformDevelopmentActivitiesYesRadioBtn);
         BaseMethods.webelementverify(reference.EperformDevelopmentActivitiesNoRadioBtn);
         BaseMethods.webelementverify(referenceMaterialPage.EperformDescriptionText);
         BaseMethods.webelementverify(referenceMaterialPage.EperformIsActiveText);
         BaseMethods.webelementverify(referenceMaterialPage.EperformPillarText);
         BaseMethods.webelementverify(referenceMaterialPage.EperformDateText);
         BaseMethods.webelementverify(referenceMaterialPage.EperformYesNoText);
         BaseMethods.webelementverify(formtemplate.EperformCancelButton);
         BaseMethods.webelementverify(reference.EperformSubmit);
         System.Threading.Thread.Sleep(2000);
         formtemplate.EperformCancelButton.Click();
         home.pageverify(list[4].ToString());
     }
     catch
     {
         formtemplate.EperformCancelButton.Click();
     }
 }
        public void verifyPillarInDevelopmentActivity()
        {
            ExtentReport.test = ExtentReport.extent.StartTest("verifyPillarInDevelopmentActivity");
            ArrayList             list                           = BaseClass.GetData("EP_TESTDATA", "ReferencePillar", "KeyName", "ReferncePillar_01");
            LoginPage             login                          = new LoginPage(_driver);
            HomePage              home                           = new HomePage(_driver);
            FormTemplatePage      formtemplate                   = new FormTemplatePage(_driver);
            ReferenceMaterialPage referenceMaterialPage          = new ReferenceMaterialPage(_driver);
            ReferenceMaterialPageDevelopmentActivities reference = new ReferenceMaterialPageDevelopmentActivities(_driver);
            ReferenceMaterialPagePillars referencePillars        = new ReferenceMaterialPagePillars(_driver);

            referencePillars.createPillar("ReferencePillar", "ReferncePillar_01");
            System.Threading.Thread.Sleep(2000);
            home.EperformReferenceMaterialIcon.Click();
            home.EperformDevelopmentActivitiesOption.Click();
            referenceMaterialPage.EperformAddDevelopmentActivityButton.Click();
            reference.EperformPillarDropDownIcon.Click();
            IWebElement element = _driver.FindElement(By.XPath("//option[text()='" + list[1].ToString() + "']"));

            BaseMethods.webelementverify(element);
            formtemplate.EperformCancelButton.Click();
        }
        public void DevelopmentActivityFormTemplateToInactive()
        {
            HomePage homepage = new HomePage(_driver);

            formTemplatepage  = new FormTemplatePage(_driver);
            ExtentReport.test = ExtentReport.extent.StartTest("DevelopmentActivityFormTemplateToInactive");
            DataRow dr = ExcelData.GetData_DataTable("EP_TESTDATA", "FormTemplateTest", "KeyName", "FormType2").Rows[0];

            homepage.EperformSystemConfigurationArrowIcon.Click();
            homepage.EperformFormTemplatesOption.Click();
            formTemplatepage.EperformFormTemplateSearchTextBox.SendKeys(dr["FormName"].ToString());
            formTemplatepage.EperformFormTemplateSearchButton.Click();
            BaseMethods.webelementverify(formTemplatepage.EperformActiveSortText);
            formTemplatepage.EperformEditButton.Click();
            BaseMethods.webelementverify(formTemplatepage.EperformComponentTypeText);
            formTemplatepage.EperformNoRadioButton.Click();
            formTemplatepage.EperformSubmitButton.Click();
            homepage.EperformSystemConfigurationArrowIcon.Click();
            homepage.EperformFormTemplatesOption.Click();
            formTemplatepage.EperformFormTemplateSearchTextBox.SendKeys(dr["FormName"].ToString());
            formTemplatepage.EperformFormTemplateSearchButton.Click();
            BaseMethods.webelementverify(formTemplatepage.EperformActiveSortText);
        }