/// <summary>
        /// Opens the Add Observation window if it is not already open, then chooses a user-specified learner, clicks the Next button,
        /// chooses the EPA radio button, chooses a user-specified stage, epa and observation tool, then completes the observation
        /// </summary>
        /// <param name="learnerFullName">The first and last name of the learner</param>
        /// <param name="observationType">Not implemented yet, just leave this null for now</param>
        /// <param name="stage">The exact text of any stage within the Stage select element on the Add Observation form</param>
        /// <param name="epa">The exact text of any EPA underneath the Stage select element</param>
        /// <param name="observationTool">The exact text of any observation tool underneath the EPAs on this form</param>
        /// <returns>An object that represents the learner, the stage, epa, observation tool, and also the completed observation details</returns>
        // TODO: Implement Narrative observation type. Make another method where the selection of stage, epa and observation tool are random selections (AddRandomObservation).
        public AddedObservationInfo AddObservation(string learnerFullName, string observationType, string stage, string epa, string observationTool)
        {
            //AddObservationObject AOO = new AddObservationObject("", "", "", );

            // If the form is not open, then open it.
            if (!Browser.Exists(Bys.CBDObserverPage.AddObsFormLearnerNameTxt, ElementCriteria.IsVisible))
            {
                ClickAndWait(AddObservationBtn);
            }

            SearchAndSelectLearnerOnAddObservationForm(learnerFullName);
            ClickAndWait(AddObsFormNextBtn);

            ElemSet.RdoBtn_ClickByText(Browser, "EPA/IM Observation");
            ClickAndWait(AddObsFormNextBtn);

            AddObsFormStageSelElem.SelectByText(stage);
            Browser.WaitForElement(Bys.CBDObserverPage.AddObsFormBackBtn, ElementCriteria.IsVisible, ElementCriteria.IsEnabled, ElementCriteria.HasText);
            this.WaitForInitialize();

            ElemSet.RdoBtn_ClickByText(Browser, epa);
            Browser.WaitForElement(Bys.CBDObserverPage.AddObsFormBackBtn, ElementCriteria.IsVisible, ElementCriteria.IsEnabled, ElementCriteria.HasText);
            this.WaitForInitialize();

            ElemSet.RdoBtn_ClickByText(Browser, observationTool);
            AddObsFormNextBtn.Click();
            Browser.WaitForElement(Bys.CBDObserverPage.CompleteAssessFormFeedbackTxt, ElementCriteria.IsEnabled, ElementCriteria.IsVisible);
            this.WaitForInitialize();

            // Fill out the observation form and return the values that were chosen
            CompletedAssessmentInfo assessment = FillObservationFieldsOnFormToCompleteAssessment();

            ClickAndWait(CompleteAssessFormSubmitBtn);

            return(new AddedObservationInfo(learnerFullName, stage, observationTool, assessment));
        }
        /// <summary>
        /// Clicks the user-specified element and then waits for a window to close or open, or a page to load,
        /// depending on the element that was clicked
        /// </summary>
        /// <param name="buttonOrLinkElem">The button element</param>
        public void ClickAndWait(IWebElement buttonOrLinkElem)
        {
            if (Browser.Exists(Bys.CBDObserverPage.AccDecAssgnMntFormAcceptBtn))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == AccDecAssgnMntFormAcceptBtn.GetAttribute("outerHTML"))
                {
                    AccDecAssgnMntFormAcceptBtn.Click();
                    this.WaitForInitialize();
                    // 9/18/17 Commented the following line. Im pretty sure this is not needed anymore, because I implemented this wait in the PageCriteria class
                    Browser.WaitForElement(Bys.RCPPage.LoadIcon, TimeSpan.FromSeconds(60), ElementCriteria.AttributeValue("class", "page-splash dissolve-animation ng-hide")
                                           .OR(ElementCriteria.AttributeValue("class", "page-splash dissolve-animation ng-animate ng-hide")));
                    return;
                }
            }

            if (Browser.Exists(Bys.RCPPage.CBDTab))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == CBDTab.GetAttribute("outerHTML"))
                {
                    buttonOrLinkElem.Click();
                    this.WaitUntil(Criteria.CBDObserverPage.PageReady);
                    return;
                }
            }

            if (Browser.Exists(Bys.CBDObserverPage.AccDecAssgnMntFormDeclineBtn))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == AccDecAssgnMntFormDeclineBtn.GetAttribute("outerHTML"))
                {
                    AccDecAssgnMntFormDeclineBtn.Click();
                    Browser.WaitForElement(Bys.CBDObserverPage.ConfirmFormCompleteAssessYesBtn, ElementCriteria.IsEnabled);
                    this.WaitForInitialize();
                    return;
                }
            }

            if (Browser.Exists(Bys.CBDObserverPage.ConfirmFormRemoveAssessOkBtn))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == ConfirmFormRemoveAssessOkBtn.GetAttribute("outerHTML"))
                {
                    ConfirmFormRemoveAssessOkBtn.Click();
                    this.WaitForInitialize();
                    return;
                }
            }

            if (Browser.Exists(Bys.CBDObserverPage.ConfirmFormDeclineAssessYesBtn))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == ConfirmFormDeclineAssessYesBtn.GetAttribute("outerHTML"))
                {
                    ConfirmFormDeclineAssessYesBtn.Click();
                    this.WaitForInitialize();
                    return;
                }
            }

            if (Browser.Exists(Bys.CBDObserverPage.CompleteAssessFormSubmitBtn))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == CompleteAssessFormSubmitBtn.GetAttribute("outerHTML"))
                {
                    CompleteAssessFormSubmitBtn.Click();
                    this.WaitForInitialize();
                    Browser.WaitForElement(Bys.CBDObserverPage.ConfirmFormCompleteAssessYesBtn, ElementCriteria.IsEnabled);
                    return;
                }
            }

            if (Browser.Exists(Bys.CBDObserverPage.ConfirmFormCompleteAssessYesBtn))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == ConfirmFormCompleteAssessYesBtn.GetAttribute("outerHTML"))
                {
                    ConfirmFormCompleteAssessYesBtn.Click();
                    this.WaitForInitialize();
                    return;
                }
            }

            if (Browser.Exists(Bys.RCPPage.LogoutLnk))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == LogoutLnk.GetAttribute("outerHTML"))
                {
                    LogoutLnk.Click();
                    new WebDriverWait(Browser, TimeSpan.FromSeconds(20)).Until(ExpectedConditions.UrlContains("login"));
                    return;
                }
            }

            if (Browser.Exists(Bys.CBDObserverPage.AddObservationBtn))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == AddObservationBtn.GetAttribute("outerHTML"))
                {
                    AddObservationBtn.Click();
                    WaitUtils.WaitForPopup(Browser, TimeSpan.FromSeconds(30), Bys.CBDObserverPage.AddObsFormSearchBtn);
                    this.WaitForInitialize();
                    return;
                }
            }

            if (Browser.Exists(Bys.CBDObserverPage.AddObsFormSearchBtn))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == AddObsFormSearchBtn.GetAttribute("outerHTML"))
                {
                    AddObsFormSearchBtn.Click();
                    WaitUtils.WaitForPopup(Browser, TimeSpan.FromSeconds(30), Bys.CBDObserverPage.AddObsFormObsTblFacultyColHdr);
                    this.WaitForInitialize();
                    Thread.Sleep(1000);
                    return;
                }
            }

            if (Browser.Exists(Bys.CBDObserverPage.AddObsFormNextBtn))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == AddObsFormNextBtn.GetAttribute("outerHTML"))
                {
                    AddObsFormNextBtn.Click();
                    Browser.WaitForElement(Bys.CBDObserverPage.AddObsFormBackBtn, ElementCriteria.IsEnabled);
                    Browser.WaitForElement(Bys.CBDObserverPage.AddObsFormBackBtn, ElementCriteria.IsVisible);
                    Browser.WaitForElement(Bys.CBDObserverPage.AddObsFormBackBtn, ElementCriteria.HasText);
                    this.WaitForInitialize();
                    return;
                }
            }

            else
            {
                throw new Exception("No button or link was found with your passed parameter. You either need to add this button to a new If statement, " +
                                    "or if the button is already added, then the page you were on did not contain the button.");
            }
        }