public void WhenRunTheInvitationWithAlumni(string eventName, string alumniName) { try { eventName += uniqueStamp; alumniName += uniqueStamp; EventPanel.WaitClick(EventPanel.getXDatalistRowLinkByActionAndCaption("", eventName), 10); //click on the invitation name under the Invitation tab EventPanel.ClickSectionAddButton("Invitees"); // select the invitee add button EventPanel.WaitClick(getXMenuItem("Constituent"), 10); // select to add a constituent Dialog.SetSearchList(Dialog.getXInput("dataformdialog", "_CONSTITUENTID_value"), Dialog.getXInput("ConstituentSearch", "_KEYNAME_value"), alumniName); // add the constituent in the search box Dialog.Save(); string invitationSend; invitationSend = "Send Inv" + eventName + " to " + eventName + " invitees"; string xWaitText = "//div[text()='" + invitationSend + "']"; EventPanel.WaitClick(xWaitText, 10); // send the invitation Dialog.ClickButton("Start", 50); // press the start button } catch (Exception ex) { throw new Exception("Error: could not run the invitation. " + ex.Message); } }