Пример #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 createGoal(String SheetName, String keyword)
        {
            DataRow data = ExcelData.GetData_DataTable("ER_TESTDATA", SheetName, "KeyName", keyword).Rows[0];

            nametext = data["FormName"].ToString() + "_" + DateTime.Now.ToString().Replace(' ', '_').Replace(':', '_').Replace('/', '_');
            EperformSubmitButton.Click();
            BaseMethods.webelementverify(EperformErrorMessageText);
            BaseMethods.webelementverify(EperformNameTextFiledErrorMessage);
            BaseMethods.webelementverify(EperformDescriptionTextFieldErrorMessage);
            EperformGoalNameTextBox.SendKeys(nametext);
            EperformDescriptionTextBox.SendKeys(data["Description"].ToString());
            EperformPillarId.Click();
            BaseMethods.DdlSelectByText(EperformPillarId, data["Pillar"].ToString());
            if (data["IsRated"].ToString() == "Yes")
            {
                EperformRatedYesRadioButton.Click();
            }
            else
            {
                EperformRatedNoRadioButton.Click();
            }
            EperformMeasureId.Click();
            BaseMethods.DdlSelectByText(EperformMeasureId, data["Measure"].ToString());
            EperformParentGoalId.Click();
            BaseMethods.DdlSelectByText(EperformParentGoalId, data["ParentGoal"].ToString());
            //Select the Goal Type
            if (data["Goal Type"].ToString() == "Organisation Goal")
            {
                EperformGoalTypeId.Click();
                BaseMethods.DdlSelectByText(EperformGoalTypeId, data["Goal Type"].ToString());
            }
            else
            {
                EperformGoalTypeId.Click();
                BaseMethods.DdlSelectByText(EperformGoalTypeId, data["Goal Type"].ToString());
                _driver.FindElement(By.XPath("//label[contains(text(),'" + data["Position Goal"].ToString() + "')]")).Click();
            }
            if (data["IsActive"].ToString() == "Yes")
            {
                EperformActiveYesRadioButton.Click();
            }
            else
            {
                EperformActiveNoRadioButton.Click();
            }
            EperformSubmitButton.Click();
            BaseMethods.webelementverify(EperformSuccessMessageText);
            search(nametext);
            EperformViewHierarachyLink.Click();
        }