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 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 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 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 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 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 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(); } }