public ManagerSiteManager()
 {
     this._accountMgr = new AccountManager();
     this._dashboardMgr = new DashboardManager();
     this.BibNumberTool = new BibNumberingToolManager();
     this._getStartedMgr = new GetStartedManager();
     this._createNewMgr = new CreateNewManager();
     this.SearchMgr = new SearchManager();
 }
        private void VerifyStatus(DashboardManager.EventStatus status)
        {
            UIUtil.DefaultProvider.ClearCookiesAndRestart();
            LoginAndGoToRegressionFolder();
            ManagerSiteMgr.OpenEventDashboard(eventID);
            ManagerSiteMgr.DashboardMgr.ChooseTabAndVerify(DashboardManager.DashboardTab.EventDetails);
            ManagerSiteMgr.DashboardMgr.VerifyEventStatus(status);

            switch (status)
            {
                case DashboardManager.EventStatus.Active:
                    UIUtil.DefaultProvider.OpenUrl(ConfigReader.DefaultProvider.AccountConfiguration.BaseUrl + "Register/Checkin.aspx?EventID=" + eventID + "&O=" + Guid.NewGuid());
                    UIUtil.DefaultProvider.RefreshPage();
                    VerifyTool.VerifyValue(false, !UIUtil.DefaultProvider.IsElementHidden(TestModeLocator, LocateBy.Id), "In test mode");
                    ////VerifyTool.VerifyValue(false, !UIUtil.DefaultProvider.IsElementDisplay(TestModeLocator, LocateBy.Id), "Verify 'In test mode' display:{0}");
                    RegisterForGoLiveEvent();
                    break;
                case DashboardManager.EventStatus.Archived:
                    UIUtil.DefaultProvider.OpenUrl(ConfigReader.DefaultProvider.AccountConfiguration.BaseUrl + "Register/Checkin.aspx?EventID=" + eventID + "&P=" + Guid.NewGuid());
                    UIUtil.DefaultProvider.RefreshPage();
                    VerifyTool.VerifyValue(true, RegisterMgr.VerifyEventIsArchivedStatus(), "Archived Page is not displayed!");
                    break;
                case DashboardManager.EventStatus.Cancelled:
                    UIUtil.DefaultProvider.OpenUrl(ConfigReader.DefaultProvider.AccountConfiguration.BaseUrl + "Register/Checkin.aspx?EventID=" + eventID + "&Q=" + Guid.NewGuid());
                    UIUtil.DefaultProvider.RefreshPage();
                    VerifyTool.VerifyValue(false, RegisterMgr.DoesCheckinAcceptEmail(), "Email Address is visible!");
                    break;
                case DashboardManager.EventStatus.Inactive:
                    UIUtil.DefaultProvider.OpenUrl(ConfigReader.DefaultProvider.AccountConfiguration.BaseUrl + "Register/Checkin.aspx?EventID=" + eventID + "&R=" + Guid.NewGuid());
                    UIUtil.DefaultProvider.RefreshPage();
                    VerifyTool.VerifyValue(false, RegisterMgr.DoesCheckinAcceptEmail(), "Email Address is visible!");
                    break;
                case DashboardManager.EventStatus.OnSite:
                    UIUtil.DefaultProvider.OpenUrl(ConfigReader.DefaultProvider.AccountConfiguration.BaseUrl + "Register/Checkin.aspx?EventID=" + eventID + "&S=" + Guid.NewGuid());
                    UIUtil.DefaultProvider.RefreshPage();
                    VerifyTool.VerifyValue(false, RegisterMgr.DoesCheckinAcceptEmail(), "Email Address is visible!");
                    break;
                case DashboardManager.EventStatus.SoldOut:
                    UIUtil.DefaultProvider.OpenUrl(ConfigReader.DefaultProvider.AccountConfiguration.BaseUrl + "Register/Checkin.aspx?EventID=" + eventID + "&T=" + Guid.NewGuid());
                    UIUtil.DefaultProvider.RefreshPage();
                    VerifyTool.VerifyValue(false, RegisterMgr.DoesCheckinAcceptEmail(), "Email Address is visible!");
                    break;
                case DashboardManager.EventStatus.Testing:
                    UIUtil.DefaultProvider.OpenUrl(ConfigReader.DefaultProvider.AccountConfiguration.BaseUrl + "Register/Checkin.aspx?EventID=" + eventID + "&U=" + Guid.NewGuid());
                    UIUtil.DefaultProvider.RefreshPage();
                    VerifyTool.VerifyValue(true, !UIUtil.DefaultProvider.IsElementHidden(TestModeLocator, LocateBy.Id), "Not in test mode");
                    VerifyTool.VerifyValue(true, RegisterMgr.DoesCheckinAcceptEmail(), "Email Address is NOT visible!");
                    break;
                case DashboardManager.EventStatus.UpdateOnly:
                    UIUtil.DefaultProvider.OpenUrl(ConfigReader.DefaultProvider.AccountConfiguration.BaseUrl + "Register/Checkin.aspx?EventID=" + eventID + "&V=" + Guid.NewGuid());
                    int count = 0;
                    while (count < 5)
                    {
                        if (RegisterMgr.DoesCheckinAcceptEmail())
                        {
                            break;
                        }
                        else
                        {
                            UIUtil.DefaultProvider.RefreshPage();
                            count++;
                        }
                    }
                    VerifyTool.VerifyValue(true, RegisterMgr.DoesCheckinAcceptEmail(), "Email Address is NOT visible!");
                    this.helper.UpdateRegistration(emailAddr);
                    NoNewRegs();
                    break;
            }

            LoginAndGoToRegressionFolder();
        }
        /// <summary>
        /// Fills out automatically change status at a later date/time
        /// </summary>
        /// <param name="status"></param>
        /// <param name="date">mm/dd/yyyy</param>
        /// <param name="time">hh:mm AM/PM</param>
        /// <param name="statusMessage">Start page message to be displayed</param>
        public void AutomaticallyChangeStatus(DashboardManager.EventStatus status, string date, string time, string statusMessage)
        {
            string StatusToChangeTo = string.Empty;
            string ExceptionMessage = "Could not find status {0}, is this your first time activating the event? Then {1} will not appear";
            UIUtil.DefaultProvider.WaitForDisplayAndClick(AutomaticallyChangeStatusLocator, LocateBy.Id);
            UIUtil.DefaultProvider.WaitForAJAXRequest();

            switch (status)
            {
                case DashboardManager.EventStatus.Active:
                    throw new Exception("Cannot automatically change status to Active");
                case DashboardManager.EventStatus.Cancelled:
                    try
                    {
                        StatusToChangeTo = "Cancelled";
                        UIUtil.DefaultProvider.SelectWithText(StatusLocator, StatusToChangeTo, LocateBy.Id);
                    }
                    catch
                    {
                        throw new Exception(string.Format(ExceptionMessage, StatusToChangeTo));
                    }
                    break;
                case DashboardManager.EventStatus.OnSite:
                    try
                    {
                        StatusToChangeTo = "On-Site";
                        UIUtil.DefaultProvider.SelectWithText(StatusLocator, StatusToChangeTo, LocateBy.Id);
                    }
                    catch
                    {
                        throw new Exception(string.Format(ExceptionMessage, StatusToChangeTo));
                    }
                    break;
                case DashboardManager.EventStatus.SoldOut:
                    try
                    {
                        StatusToChangeTo = "Sold Out";
                        UIUtil.DefaultProvider.SelectWithText(StatusLocator, StatusToChangeTo, LocateBy.Id);
                    }
                    catch
                    {
                        throw new Exception(string.Format(ExceptionMessage, StatusToChangeTo));
                    }
                    break;
                case DashboardManager.EventStatus.Inactive:
                    StatusToChangeTo = "Inactive";
                    UIUtil.DefaultProvider.SelectWithText(StatusLocator, StatusToChangeTo, LocateBy.Id);
                    break;
                case DashboardManager.EventStatus.Archived:
                    StatusToChangeTo = "Archived";
                    UIUtil.DefaultProvider.SelectWithText(StatusLocator, StatusToChangeTo, LocateBy.Id);
                    break;
                case DashboardManager.EventStatus.Testing:
                    StatusToChangeTo = "Testing";
                    UIUtil.DefaultProvider.SelectWithText(StatusLocator, StatusToChangeTo, LocateBy.Id);
                    break;
            }

            UIUtil.DefaultProvider.Type(ChangeStatusDateLocator, date, LocateBy.Id);
            UIUtil.DefaultProvider.Type(ChangeStatusTimeLocator, time, LocateBy.Id);

            UIUtil.DefaultProvider.WaitForDisplayAndClick(AutomaticallyChangeStatusMessageLocator, LocateBy.Id);
            UIUtil.DefaultProvider.WaitForAJAXRequest();
            UIUtil.DefaultProvider.SwitchToMainContent();
            UIUtil.DefaultProvider.WaitForPageToLoad();
            UIUtil.DefaultProvider.TypeContentEditorOnFrame(statusMessage);
            UIUtil.DefaultProvider.SaveAndCloseContentEditorFrame();
        }
 private void ChangeStatus(DashboardManager.EventStatus status)
 {
     ManagerSiteMgr.OpenEventDashboard(eventID);
     ManagerSiteMgr.DashboardMgr.ChooseTabAndVerify(DashboardManager.DashboardTab.EventDetails);
     ManagerSiteMgr.DashboardMgr.ChangeStatusIfNecessary(status, status.ToString());
 }