コード例 #1
0
        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();
        }
コード例 #2
0
        /// <summary>
        /// Resuable method for the login
        /// </summary>

        public void Login(String username, String password)
        {
            System.Threading.Thread.Sleep(5000);

            BaseMethods.verifyWebElement(EperformUserNameText, "The usernametext is not displayed in the login page", "Username text is displayed in the login page");
            BaseMethods.verifyWebElement(EperformPasswordText, "The password text is not displayed in the login page", "password text is displayed in the login page");
            BaseMethods.verifyWebElement(EPerformUserNameTextBox, "The usernametextbox is not displayed in the login page", "Username textbox is displayed in the login page");
            EPerformUserNameTextBox.SendKeys(username);
            ExtentReport.test.Log(LogStatus.Info, username + "Entered value in the Username Text Field");
            BaseMethods.verifyWebElement(EperformPasswordTextBox, "The password textbox is not displayed in the login page", "PasswordTextbox is displayed in the login page");
            EperformPasswordTextBox.SendKeys(password);
            ExtentReport.test.Log(LogStatus.Info, password + "Entered value in the Password Text Field");
            BaseMethods.verifyWebElement(EperformSubmitButton, "Submit button is not displayed in the login page", "Submit Button is displayed in the login page");
            EperformSubmitButton.Click();
            System.Threading.Thread.Sleep(2000);
            BaseMethods.verifyWebElement(EperformWelcomeText, "Welcome Text is not displayed in the home page", "Welcome Text is displayed in the home page");
        }
コード例 #3
0
        public void filledByRoles(String roletype)
        {
            int count = EperformCheckBoxRoleButton.Count;

            for (int i = 0; i < count; i++)
            {
                string id = "Dto_Questions_0__SelectedTaskFlowRoleIds_" + i;
                _driver.FindElement(By.Id(id)).Click();
            }
            _driver.FindElement(By.XPath("(//label[contains(text(),'" + roletype + "')])[1]")).Click();

            int count2 = EperformCheckBoxRoleTwoButton.Count;

            for (int i = 0; i < count2; i++)
            {
                string id = "Dto_Questions_1__SelectedTaskFlowRoleIds_" + i;
                _driver.FindElement(By.Id(id)).Click();
            }
            _driver.FindElement(By.XPath("(//label[contains(text(),'" + roletype + "')])[2]")).Click();
            EperformSubmitButton.Click();
        }
コード例 #4
0
        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();
        }
コード例 #5
0
        //Eperform To handleLocalQuestionSingleLineTextBox Method
        public void handleLocalQuestionSingleLineTextBox(String SingleQuestion, String refrence, String label, String Requiredption, String ReadOnlyOption)
        {
            try
            {
                SelectQuestionTypePage selectquestion = new SelectQuestionTypePage(_driver);
                Assert.IsTrue(RdoSingleItemSelect.Displayed, "Radio Single Line TextBox is not displayed Select Question Type");
                ExtentReport.test.Log(LogStatus.Pass, "Radio Single Line TextBox is displayed Select Question Type");
                RdoSingleItemSelect.Click();
                EperformTxtSingleLineTextBox.SendKeys(SingleQuestion);
                eleBtnSubmit.Click();
                Assert.IsTrue(EperformComponentTypeText.Displayed, "Component Type is not displayed");
                ExtentReport.test.Log(LogStatus.Pass, EperformComponentTypeText.Text + "is displayed");
                Assert.IsTrue(EperformReferenceTestbox.Displayed, "Eperform Reference Testbox is not displayed Select Question Type");
                ExtentReport.test.Log(LogStatus.Pass, "Eperform Reference Testbox is displayed Select Question Type");
                EperformReferenceTestbox.SendKeys(refrence);
                System.Threading.Thread.Sleep(2000);
                LabelhandleFrame.Click();
                TxtLabel(label);

                if (ReadOnlyOption == "Yes")
                {
                    EperformReadOnlyYesRadioBtn.Click();
                }
                if (Requiredption == "Yes")
                {
                    EperformRequiredYesRadioBtn.Click();
                }
                EperformSubmitButton.Click();
                System.Threading.Thread.Sleep(2000);
                EperformCancelButton.Click();
                System.Threading.Thread.Sleep(2000);
                Assert.IsTrue(EperformGlobalQuestionDeleteButton.Displayed, "Eperform GlobalQuestion Delete Button is not displayed in manage form");
                ExtentReport.test.Log(LogStatus.Pass, "Eperform GlobalQuestion Delete Button is displayed in manage form");
            }
            catch (Exception e)
            {
                ExtentReport.test.Log(LogStatus.Fatal, "Exception Message: " + e.Message);
            }
        }
コード例 #6
0
        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");
        }
コード例 #7
0
        //Eperform To handleAddLocalQuestionMultiLineTextArea Method
        public void handleAddLocalQuestionMultiLineTextArea(String multilineValue, String refrence, String maxlength, String label, String Requiredption, String ReadOnlyOption)
        {
            try
            {
                SelectQuestionTypePage selectquestion = new SelectQuestionTypePage(_driver);

                EperformAddquestionButton.Click();
                EperformRdoMultiLineTextArea.Click();
                EperformTxtMultiLineTextArea.SendKeys(multilineValue);
                System.Threading.Thread.Sleep(2000);
                eleBtnSubmit.Click();
                System.Threading.Thread.Sleep(2000);

                BaseMethods.webelementverify(EperformComponentTypeText);

                EperformReferenceTestbox.SendKeys(refrence);
                System.Threading.Thread.Sleep(2000);
                LabelhandleFrame.Click();
                TxtLabel(label);
                if (ReadOnlyOption == "Yes")
                {
                    EperformReadOnlyYesRadioBtn.Click();
                }
                if (Requiredption == "Yes")
                {
                    EperformRequiredYesRadioBtn.Click();
                }
                EperformMaximumLengthTextBox.SendKeys(maxlength);
                EperformSubmitButton.Click();
                BaseMethods.verifyWebElement(EperformSuccessMessage, "Eperform Success Message is not displayed in manage form", "Eperform Success Message is displayed in manage form");
                BaseMethods.verifyWebElement(EperformGlobalQuestionDeleteButton, "Eperform GlobalQuestion Delete Button is not displayed in manage form", "Eperform GlobalQuestion Delete Button is displayed in manage form");
            }
            catch (Exception e)
            {
                ExtentReport.test.Log(LogStatus.Fatal, "Exception Message: " + e.Message);
            }
        }