public void GivenSearchForEvent(string eventName)
        {
            try
            {
                BBCRMHomePage.OpenEventsFA();                // open event functional area
                EventsFunctionalArea.EventSearch(eventName); // search for an event
                EventPanel.OpenTab("Registrations");
                String xRegistrantName = "//input[contains(@id,'_CONSTITUENTNAME_value')]";
                Panel.SetTextField(xRegistrantName, "Crispin"); // search for the Kelli Crispin registrant with the "Crispin" char string
                Panel.GetDisplayedElement(xRegistrantName).SendKeys(Keys.Enter);
                string xSelectedRow;
                xSelectedRow = "//div[contains(@id,'ext-gen')]/div/table/tbody/tr[1]/td[4]/div/a";
                Dialog.WaitClick(xSelectedRow, 15);

                //click on the link to remove a registrant
                Dialog.WaitClick("//button[contains(@class,'linkbutton')]/div[text()='Delete registrant']", 10);
                //click on the link to remove a spouse

                Dialog.Yes();
            }
            catch (Exception ex)
            {
                throw new Exception("Error: could not search for the event. " + ex.Message);
            }
        }
        public void WhenICreateAnInvitation(string eventName)
        {
            string invitationName;
            string xTab;

            eventName += uniqueStamp;
            BBCRMHomePage.OpenEventsFA();

            EventsFunctionalArea.EventSearch(eventName);  //search for an event
            invitationName = "Inv" + eventName;
            string caption = "General";

            EventPanel.OpenTab("Invitations");               //open the invitations tab
            EventPanel.ClickSectionAddButton("Invitations"); // add an invitation
            xTab = getXInnerTab(caption);
            EventPanel.getXTab(xTab);

            string xEmailString;

            xEmailString = Dialog.getXInput("InvitationAddForm", "_NAME_value");
            xTab         = getXInnerTab(caption);
            Dialog.WaitClick(xTab, 10);                                                                           //open the general subtab in the popup
            Dialog.SetTextField(xEmailString, invitationName);                                                    // enter the invitation name
            Dialog.SetTextField("//input[contains(@id, '_MAILDATE_value')]", DateTime.Today.ToShortDateString()); //add in the date
            xEmailString = Dialog.getXInput("PackageSearch", "_NAME_value");

            caption = "Processing Options";
            xTab    = getXInnerTab(caption);
            Dialog.WaitClick(xTab, 10);
            Dialog.SetCheckbox("//input[contains(@id, '_CHANNELCODE_1')]", true);  //set the "send through email" radio button to true
            // enter email package name
            Dialog.SetSearchList(Dialog.getXInput("InvitationAddForm", "_EMAILPACKAGEID_value"), xEmailString, "UDO FY16 Carolina Connection Email Package");
            Dialog.Save();
        }