public string VerifyMandetoryFields(ExcelUtil excel) { string TCName = "VerifyMandetoryFieldsAndContactDetailsInformation"; string[] fieldNames = { "Spring half term holidays", "Easter holidays", "Summer half term holidays", "Next year Accademic Spring half term holidays", " Next year AccademicEaster holidays", " Next year Accademic Summer half term holidays" }; string[] StartDates = { "SpringHalfTermHolidaysStartDate", "EasterHolidaysStartDate", "SummerHalfTtermHolidaysStartDate", "NextYearSpringHalfTermHolidaysStartDate", "NextYearEasterHolidaysStartDate", "NextYearSummerHalfTtermHolidaysStartDate" }; string[] EndDates = { "SpringHalfTermHolidaysEndtDate", "EasterHolidaysEndDate", "SummerHalfTtermHolidaysEndDate", "NextYearSpringHalfTermHolidaysEndtDate", "NextYearEasterHolidaysEndDate", "NextYearSummerHalfTtermHolidaysEndDate" }; string errorList = ""; if (!seleniumFunc.IsElementDisplayed(confirmHolidayDatesPage.NextAcademicHolidaysYesRadioBtn)) { errorList = "Do you wish to add holidays for the next academic year? is not mandetory field. \n"; } seleniumFunc.WaitAndClickOnElement(confirmHolidayDatesPage.NextAcademicHolidaysYesRadioBtn); for (int i = 0; i < 6; i++) { // errorList = errorList + CheckStartDateErrorMsg(i, excel.GetDataFromExcel(StartDates[i]), fieldNames[i]); CheckStartDateErrorMsg(i, excel.GetDataFromExcel(TCName, StartDates[i]), fieldNames[i]); CheckEndDateErrorMsg(i, excel.GetDataFromExcel(TCName, EndDates[i]), fieldNames[i]); // errorList = errorList + CheckEndDateErrorMsg(i, excel.GetDataFromExcel(EndDates[i]), fieldNames[i]); } return(errorList); }
public void verifyAdditionalQuestionOnIllnessSelection() { seleniumFunc.ScrollElementInView(timeTableVarPage.SectionBQ1YesRadioBtn); VerifyIsTrue(seleniumFunc.IsElementDisplayed(timeTableVarPage.Illness_PupleFitYesRadioBtn), "Check 'Has the pupil(s) returned to school and is fit to take the test?' question should displayed on Illness selection"); seleniumFunc.WaitAndClickOnElement(timeTableVarPage.Illness_PupleFitNoRadioBtn); seleniumFunc.WaitForPageToLoad(); VerifyIsTrue(seleniumFunc.IsElementDisplayed(timeTableVarPage.Illness_PupleFitNoRadioBtnErrorMsg), "Check Error Mssage should display on 'Has the pupil(s) returned to school and is fit to take the test?' No radio btn selected."); }
public void checkReviewComment(string furtherInfrmation) { if (seleniumFunc.IsElementDisplayed(moreInforPage.FurtherInfRequiredTextArea)) { VerifyIsEquals(furtherInfrmation, moreInforPage.FurtherInfRequiredTextArea.GetAttribute("value"), "Check further Infromation textarea value"); } else if (seleniumFunc.IsElementDisplayed(moreInforPage.FurtherInfRequiredTextArea)) { VerifyIsEquals(furtherInfrmation, moreInforPage.FurtherInfRequiredTextArea1.GetAttribute("value"), "Check further Infromation textarea value"); } }
public void CheckPrivacyNotice(bool isIndependetSchool) { if (isIndependetSchool) { seleniumFunc.ScrollElementInView(ksOnePage.ConfirmedPrivecyNoticeIssuedRadionBtn); VerifyIsTrue(seleniumFunc.IsElementDisplayed(ksOnePage.ConfirmedPrivecyNoticeIssuedRadionBtn), "Check Confirmed - privacy notices issued Radion button should display."); VerifyIsTrue(seleniumFunc.IsElementDisplayed(ksOnePage.PrivecyNoticeNotIssuedRadiobtn), "Check Privacy notices have not been issued Radion button should display."); } else { seleniumFunc.ScrollElementInView(ksOnePage.YourEmailAddressTextBox); VerifyIsFalse(seleniumFunc.IsElementDisplayed(ksOnePage.ConfirmedPrivecyNoticeIssuedRadionBtn), "Check Confirmed - privacy notices issued Radion button should not display."); VerifyIsFalse(seleniumFunc.IsElementDisplayed(ksOnePage.PrivecyNoticeNotIssuedRadiobtn), "Check Privacy notices have not been issued Radion button should not display."); } }
/// <summary> /// Method to CHeck /// </summary> /// <param name="isIndependetSchool"></param> public void CheckPrivacyNotice(bool isIndependetSchool) { if (isIndependetSchool) { seleniumFunc.ScrollElementInView(ModifiedKS2.ConfirmedPrivecyNoticeIssuedRadionBtn); VerifyIsTrue(seleniumFunc.IsElementDisplayed(ModifiedKS2.ConfirmedPrivecyNoticeIssuedRadionBtn), "Check Confirmed - privacy notices issued Radion button should display."); VerifyIsTrue(seleniumFunc.IsElementDisplayed(ModifiedKS2.PrivecyNoticeNotIssuedRadiobtn), "Check Privacy notices have not been issued Radion button should display."); seleniumFunc.WaitAndClickOnElement(ModifiedKS2.PrivecyNoticeNotIssuedRadiobtn); seleniumFunc.WaitForPageToLoad(); VerifyIsTrue(seleniumFunc.IsElementDisplayed(ModifiedKS2.PrivecyNoticeNotIssuedErrorMsg), "Check error message should dispaly when 'Privacy notices have not been issued' raido button selected."); } else { VerifyIsFalse(seleniumFunc.IsElementDisplayed(ModifiedKS2.ConfirmedPrivecyNoticeIssuedRadionBtn), "Check Confirmed - privacy notices issued Radion button should not display."); VerifyIsFalse(seleniumFunc.IsElementDisplayed(ModifiedKS2.ConfirmedPrivecyNoticeIssuedRadionBtn), "Check Privacy notices have not been issued Radion button should not display."); } }
public bool IsUploadedDocDisplayed(string fileName) { IWebElement ele = GetDriver().FindElement(By.XPath(viewKS1TestMaterialPage.DonwloadFileBtn.Replace("$$", fileName))); return(seleniumFunc.IsElementDisplayed(ele)); }
public void CheckWarningMsgForPupileVisualImpairment() { VerifyIsTrue(seleniumFunc.IsElementDisplayed(ModifiedKS1Page.EnglishGrammergMLPErrorMsg), "Check English Grammerg MLP Error Msg"); VerifyIsTrue(seleniumFunc.IsElementDisplayed(ModifiedKS1Page.MathematicsMLPErrorMsg), "Check Mathematics MLP Error Msg"); VerifyIsTrue(seleniumFunc.IsElementDisplayed(ModifiedKS1Page.EnglishReadingMLPErrorMsg), "Check English Reading MLP Error Msg"); }
public void CheckSearchResult(string schoolName, string Email) { VerifyIsTrue(seleniumFunc.IsElementDisplayed(GetDriver().FindElement(By.XPath(eventLogsOfDownloadPage.SearchResult.Replace("$$", schoolName)))), "Check School Name should displayed in event log"); VerifyIsTrue(seleniumFunc.IsElementDisplayed(GetDriver().FindElement(By.XPath(eventLogsOfDownloadPage.SearchResult.Replace("$$", Email)))), "Check user Email should displayed in event log"); }