Ejemplo n.º 1
0
        /// <summary>
        /// If an upcoming agenda is not created (e.g. No items in the Meeting Agenda dropdown have an agenda that says "Upcoming"), then
        /// this creates one with a user-specified date. First it will click on the Competenece Committee tab if we are not on this page,
        /// then it opens the Create New Agenda window, assigns the date and clicks Create to create the new agenda
        /// </summary>
        /// <param name="yearsToAdd">However many years you want to add to the current date. If you want a random date, enter "-1"</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 CreateUpcomingAgendaWithSpecificDateIfNoneExist(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);
            }

            // If none of the list<string> items contain the text "Upcoming", then create an upcoming agenda
            if (!ElemGet.SelElem_ContainsText(MeetingAgendaSelElem, "Upcoming"))
            {
                CreateUpcomingAgendaWithSpecificDate(yearsToAdd, monthsToAdd, daysToAdd);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Clicks on the Competence Committee tab if that page is not in view, then If an upcoming agenda is not created
        /// (e.g. No items in the Meeting Agenda dropdown have an agenda that says "Upcoming"), then this creates one with
        /// a random date. It opens the Create New Agenda window, assigns the date and clicks Create to create the new agenda.
        /// It will return the string representation of the agenda in the Meeting Agenda dropdown, so you can then select it.
        /// </summary>
        public string CreateUpcomingAgendaWithRandomDateIfNoneExist()
        {
            string agendaName = "";

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

            // If none of the list<string> items contain the text "Upcoming", then create an upcoming agenda
            if (!ElemGet.SelElem_ContainsText(MeetingAgendaSelElem, "Upcoming"))
            {
                agendaName = CreateUpcomingAgendaWithRandomDate();
            }
            else // else return the string value of an existing one
            {
                return(ElemGet.SelElem_GetFirstItemContainingText(MeetingAgendaSelElem, "Upcoming").Text);
            }

            return(agendaName);
        }