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 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 MultiSelectSingleSelectGlobalQuestionsCannotActiveInactiveFormTemplateDevelopmentActivity() { HomePage homepage = new HomePage(_driver); formTemplatepage = new FormTemplatePage(_driver); ExtentReport.test = ExtentReport.extent.StartTest("MultiSelectSingleSelectGlobalQuestionsCannotActiveInactiveFormTemplateDevelopmentActivity"); 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", ""); 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 not displayed"); formTemplatepage.EperformCancelButton.Click(); homepage.EperformSystemConfigurationArrowIcon.Click(); homepage.EperformFormTemplatesOption.Click(); formTemplatepage.addFormTemplateDevelopmentActivityForm("FormTemplateTest", "FormType2"); formTemplatepage.addGlobalQuestion("FormTemplateTest", "FormType2"); 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"); } }