/// <summary> /// Clicks on the Competence Committee tab if that page is not in view, then creates an upcoming agenda with a random date. /// It opens the Create New Agenda window, assigns the date and clicks Create to create the new agenda. It will then pick this /// new agenda in the Meeting Agenda dropdown /// </summary> public void CreateUpcomingAgendaThenSelectIt() { string agendaToSelect = ""; // If we are not on the Competence Committee tab, then click on it to go there if (!Browser.Exists(Bys.CBDProgDirectorPage.FinalizeAgendaBtn, ElementCriteria.IsEnabled)) { ClickAndWait(CompCommiteeTab); } agendaToSelect = CreateUpcomingAgendaWithRandomDate(); ElemSet.SelElem_SelectItemContainingText(MeetingAgendaSelElem, agendaToSelect); Browser.WaitForElement(Bys.RCPPage.LoadIcon, TimeSpan.FromMinutes(3), ElementCriteria.AttributeValue("class", "page-splash dissolve-animation ng-hide") .OR(ElementCriteria.AttributeValue("class", "page-splash dissolve-animation ng-animate ng-hide"))); }
/// <summary> /// /// </summary> /// <param name="yearsToAdd">However many years you want to add to the current date. If none, enter "0"</param> /// <param name="monthsToAdd">However many months you want to add to the current date. If none, enter "0"</param> /// <param name="daysToAdd">However many days you want to add to the current date. If none, enter "0"</param> public void FinalizeAllUpcomingAgendasOnSpecificDate(int yearsToAdd, int monthsToAdd, int daysToAdd) { // If we are not on the Competence Committee tab, then click on it to go there if (!Browser.Exists(Bys.CBDProgDirectorPage.FinalizeAgendaBtn, ElementCriteria.IsEnabled)) { ClickAndWait(CompCommiteeTab); } string date = DateTime.Now.AddYears(yearsToAdd).AddMonths(monthsToAdd).AddDays(daysToAdd).ToString("MM/dd/yyyy"); String upcomingAgendaInstance = string.Format("{0} Upcoming", date); int countOfUpcomingAgendasOnSpecificDate = ElemGet.SelElem_GetCountOfItemsContainingText(MeetingAgendaSelElem, "Upcoming"); for (int i = 0; i < countOfUpcomingAgendasOnSpecificDate; i++) { ElemSet.SelElem_SelectItemContainingText(MeetingAgendaSelElem, upcomingAgendaInstance); ClickAndWait(FinalizeAgendaBtn); ClickAndWait(FinalizeAgendaFormFinalizeBtn); } }