Пример #1
0
        public void inactiveCreateDocumnet(String MustReadCategoryType, String supportdocumnet)
        {
            FormTemplatePage      formtemplate          = new FormTemplatePage(_driver);
            ReferenceMaterialPage referenceMaterialPage = new ReferenceMaterialPage(_driver);
            ArrayList             list = BaseClass.GetData("ER_TESTDATA", "ReferenceMaterialPage", "KeyName", "ReferenceMaterialPage_01");
            String textvaue            = list[1].ToString() + "_" + DateTime.Now.ToString().Replace(' ', '_').Replace(':', '_').Replace('/', '_');

            EperformNameTextBox.SendKeys(textvaue);
            System.Threading.Thread.Sleep(2000);
            EperformSelectFileBtn.Click();
            System.Threading.Thread.Sleep(2000);
            BaseClass.fileupload(list[2].ToString());
            if (MustReadCategoryType == "Yes")
            {
                EperformMustReadRadioBtn.Click();
            }
            if (supportdocumnet == "Yes")
            {
                EperformSupportingDocumentBtn.Click();
            }
            EperfromActiveNoRadioBtn.Click();
            EperformDescriptionTextBox.SendKeys(list[3].ToString());
            System.Threading.Thread.Sleep(2000);
            formtemplate.EperformSubmitButton.Click();
            System.Threading.Thread.Sleep(6000);
            formtemplate.EperformFormTemplateSearchTextBox.SendKeys(textvaue);
            formtemplate.EperformFormTemplateSearchButton.Click();
            System.Threading.Thread.Sleep(2000);
            BaseMethods.webelementverify(EperformDocumentActiveText);
            System.Threading.Thread.Sleep(2000);
            BaseMethods.webelementverify(referenceMaterialPage.EperformDocumentActiveText);
        }
        public void developmentActivityEditSearch(String SheetName, String Keyname)
        {
            HomePage homepage = new HomePage(_driver);
            DataRow  data     = ExcelData.GetData_DataTable("EP_TESTDATA", SheetName, "KeyName", Keyname).Rows[0];

            nametext = data["FormName"].ToString() + "_" + DateTime.Now.ToString().Replace(' ', '_').Replace(':', '_').Replace('/', '_');
            homepage.EperformSystemConfigurationArrowIcon.Click();
            homepage.EperformFormTemplatesOption.Click();
            System.Threading.Thread.Sleep(2000);
            EperformAddFormTemplateButton.Click();
            System.Threading.Thread.Sleep(2000);
            BaseMethods.verifyWebElement(EperformNameTextBox, "Eperform Name TextBox is not displayed in manage form", "Eperform Name TextBox is displayed in manage form");

            System.Threading.Thread.Sleep(2000);
            EperformNameTextBox.SendKeys(nametext);

            if (data["Active"].ToString() == "Yes")
            {
                EperformYesRadioButton.Click();
            }
            else
            {
                EperformNoRadioButton.Click();
            }
            EperformSelectformtype.Click();
            System.Threading.Thread.Sleep(2000);
            BaseMethods.DdlSelectByValue(EperformSelectformtype, data["Form Type"].ToString());
            System.Threading.Thread.Sleep(2000);
            EperformSubmitButton.Click();
            BaseMethods.verifyWebElement(EperformSuccessMessage, "Eperform Success Message is not displayed in manage form", "Eperform Success Message is displayed in manage form");
            addGlobalQuestion("FormTemplateTest", "FormType2");
            EperformCancelButton.Click();
            System.Threading.Thread.Sleep(2000);
            EperformFormTemplateSearchTextBox.SendKeys(nametext);
            EperformFormTemplateSearchButton.Click();
            System.Threading.Thread.Sleep(2000);
            EperformEditButton.Click();
            System.Threading.Thread.Sleep(2000);
            EperformEditButton.Click();
        }
        public void addformtemplateQuestionnaireForm(String SheetName, String Keyname)
        {
            HomePage homepage = new HomePage(_driver);
            DataRow  data     = ExcelData.GetData_DataTable("EP_TESTDATA", SheetName, "KeyName", Keyname).Rows[0];

            nametext = data["Form Type"].ToString() + "_" + DateTime.Now.ToString().Replace(' ', '_').Replace(':', '_').Replace('/', '_');
            homepage.EperformSystemConfigurationArrowIcon.Click();
            homepage.EperformFormTemplatesOption.Click();
            System.Threading.Thread.Sleep(2000);
            EperformAddFormTemplateButton.Click();
            BaseMethods.verifyWebElement(EperformNameTextBox, "Eperform Name TextBox is not displayed in manage form", "Eperform Name TextBox is displayed in manage form");
            System.Threading.Thread.Sleep(2000);
            EperformNameTextBox.SendKeys(nametext);
            EperformYesRadioButton.Click();
            EperformSelectformtype.Click();
            System.Threading.Thread.Sleep(2000);
            BaseMethods.DdlSelectByValue(EperformSelectformtype, data["Form Type"].ToString());
            EperformSubmitButton.Click();
            System.Threading.Thread.Sleep(2000);
            verifyFormType("ePeform Questionnaire Form");
            BaseMethods.verifyWebElement(EperformSuccessMessage, "Eperform Success Message is not displayed in manage form", "Eperform Success Message is displayed in manage form");
        }