public void AgendaCopyDelete()
        {
            Event evt = new Event("AgendaCopyDelete");
            evt.AgendaPage = new AgendaPage();
            AgendaItem_CheckBox agenda1 = new AgendaItem_CheckBox("agenda1");
            AgendaItem_CheckBox agenda2 = new AgendaItem_CheckBox("agenda2");
            evt.AgendaPage.AgendaItems.Add(agenda1);
            evt.AgendaPage.AgendaItems.Add(agenda2);

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, evt);

            Registrant reg = new Registrant(evt);
            AgendaResponse_Checkbox resp = new AgendaResponse_Checkbox();
            resp.AgendaItem = agenda1;
            resp.Checked = true;
            reg.CustomField_Responses.Add(resp);

            KeywordProvider.RegistrationCreation.CreateRegistration(reg);
            KeywordProvider.SignIn.SignIn(EventFolders.Folders.RegistrationInventory);
            KeywordProvider.ManagerDefault.OpenFormDashboard(evt.Id);
            PageObject.PageObjectProvider.Manager.Dashboard.EventDetails.EditForm_Click();
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.GotoPage(FormData.Page.Agenda);

            PageObject.Builder.RegistrationFormPages.AgendaRow row1 = new PageObject.Builder.RegistrationFormPages.AgendaRow(agenda1);
            PageObject.Builder.RegistrationFormPages.AgendaRow row2 = new PageObject.Builder.RegistrationFormPages.AgendaRow(agenda2);
            Assert.True(row1.Delete.GetAttribute("src").Contains("deletex_Off.gif"));
            row2.Copy_Click();
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.CopyAgendaAmount.Type(1);
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.OK_Click();
            Assert.AreEqual(agenda2.NameOnForm + " Copy1",
                PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.NameOnReports.Value);
            row2.Delete_Click();
            Assert.False(row2.Agenda.IsPresent);
        }
        public void ButtonTest()
        {
            Event evt = new Event("AgendaButtonTest");
            AgendaItem_CheckBox agenda1 = new AgendaItem_CheckBox("agenda1");
            AgendaItem_CheckBox agenda2 = new AgendaItem_CheckBox("agenda2");

            KeywordProvider.SignIn.SignIn(EventFolders.Folders.RegistrationInventory);

            if (KeywordProvider.ManagerDefault.DoesEventExist(evt.Title))
            {
                KeywordProvider.ManagerDefault.DeleteEvent(evt.Title);
            }

            KeywordProvider.EventCreator.ClickAddEventAndGetEventId(evt);
            KeywordProvider.EventCreator.StartPage(evt);
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.GotoPage(FormData.Page.Agenda);
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.YesOnSplashPage_Click();
            KeywordProvider.AddAgendaItem.AddAgendaItems(agenda1, evt);
            int id = Convert.ToInt32(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.AgendaItemId.Value);
            PageObject.Builder.RegistrationFormPages.AgendaRow row1 = new PageObject.Builder.RegistrationFormPages.AgendaRow(agenda1);
            Assert.True(row1.Agenda.IsPresent);
            Assert.AreEqual(row1.Agenda.GetAttribute("class"), "hs colwidth1");
            KeywordProvider.AddAgendaItem.AddAgendaItems(agenda2, evt);
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.SaveAndNew_Click();
            Assert.AreNotEqual(id, Convert.ToInt32(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.AgendaItemId.Value));
            Assert.AreEqual(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.NameOnForm.Text, "");
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.Cancel_Click();
            Assert.AreEqual(id, Convert.ToInt32(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.AgendaItemId.Value));
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.NameOnForm.Type("NameChanged");
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.Cancel_Click();
            Assert.AreEqual(id, Convert.ToInt32(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.AgendaItemId.Value));
            Assert.AreEqual(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.NameOnForm.Text, agenda1.NameOnForm);
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.NameOnForm.Type("NameChanged");
            PageObject.PageObjectProvider.Builder.EventDetails.SaveAndStay_Click();
            Assert.AreEqual(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.NameOnForm.Text, "NameChanged");
        }
        public void AgendaConditionalLogic()
        {
            Event evt = new Event("AgendaConditionalLogic");
            CFCheckBox PICustomField = new CFCheckBox("PICustomField");
            evt.PersonalInfoPage.CustomFields.Add(PICustomField);
            evt.AgendaPage = new DataCollection.AgendaPage();
            AgendaItem_Number AGNumber = new AgendaItem_Number("AGNumber");
            AGNumber.CharLimit = 10;
            AgendaItem_OneLineText AGText = new AgendaItem_OneLineText("AGText");
            AGText.CharLimit = 10;
            AgendaItem_Paragraph AGPara = new AgendaItem_Paragraph("AGPara");
            AGPara.CharLimit = 1000;
            AgendaItem_Date AGDate = new AgendaItem_Date("AGDate");
            AgendaItem_Time AGTime = new AgendaItem_Time("AGTime");
            AgendaItem_Header AGHeader = new AgendaItem_Header("AGHeader");
            AgendaItem_ContinueButton AGContinue = new AgendaItem_ContinueButton("AGContinue");
            AgendaItem_Contribution AGConribution = new AgendaItem_Contribution("AGConribution");
            AGConribution.MinAmount = 10;
            AGConribution.MaxAmount = 100;
            AgendaItem_FileUpload AGUpload = new AgendaItem_FileUpload("AGUpload");
            AgendaItem_CheckBox AGCheckBox = new AgendaItem_CheckBox("AGCheckBox");
            AgendaItem_MultipleChoice_RadioButton AGRadio = new AgendaItem_MultipleChoice_RadioButton("AGRadio");
            AGRadio.CommonlyUsedItems.Add(FormData.CommonlyUsedMultipleChoice.YesOrNo);
            AgendaItem_MultipleChoice_DropDown AGDropDown = new AgendaItem_MultipleChoice_DropDown("AGDropDown");
            AGDropDown.CommonlyUsedItems.Add(FormData.CommonlyUsedMultipleChoice.Agreement);
            AgendaItem_AlwaysSelected AGAlways = new AgendaItem_AlwaysSelected("AGAlways");
            AgendaItem_CheckBox AG1 = new AgendaItem_CheckBox("AG1");
            AG1.ConditionalLogic.Add(PICustomField.NameOnForm);
            evt.AgendaPage.AgendaItems.Add(AGNumber);
            evt.AgendaPage.AgendaItems.Add(AGText);
            evt.AgendaPage.AgendaItems.Add(AGPara);
            evt.AgendaPage.AgendaItems.Add(AGDate);
            evt.AgendaPage.AgendaItems.Add(AGTime);
            evt.AgendaPage.AgendaItems.Add(AGHeader);
            evt.AgendaPage.AgendaItems.Add(AGContinue);
            evt.AgendaPage.AgendaItems.Add(AGConribution);
            evt.AgendaPage.AgendaItems.Add(AGUpload);
            evt.AgendaPage.AgendaItems.Add(AGCheckBox);
            evt.AgendaPage.AgendaItems.Add(AGRadio);
            evt.AgendaPage.AgendaItems.Add(AGDropDown);
            evt.AgendaPage.AgendaItems.Add(AGAlways);
            evt.AgendaPage.AgendaItems.Add(AG1);

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, evt);

            KeywordProvider.ManagerDefault.OpenFormDashboard(evt.Id);
            PageObject.PageObjectProvider.Manager.Dashboard.EventDetails.EditForm_Click();
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.GotoPage(FormData.Page.Agenda);
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.AddAgendaItem_Click();
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.ExpandConditionalLogic_Click();
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.ExpandConditionalLogic_Click();
            Assert.True(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.ConditionalLogicParent(AGCheckBox.NameOnForm).IsPresent);
            Assert.True(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.ConditionalLogicParent(AGRadio.NameOnForm).IsPresent);
            Assert.True(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.ConditionalLogicParent(AGDropDown.NameOnForm).IsPresent);
            Assert.True(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.ConditionalLogicParent(AG1.NameOnForm).IsPresent);
            Assert.False(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.ConditionalLogicParent(AGNumber.NameOnForm).IsPresent);
            Assert.False(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.ConditionalLogicParent(AGText.NameOnForm).IsPresent);
            Assert.False(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.ConditionalLogicParent(AGPara.NameOnForm).IsPresent);
            Assert.False(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.ConditionalLogicParent(AGDate.NameOnForm).IsPresent);
            Assert.False(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.ConditionalLogicParent(AGTime.NameOnForm).IsPresent);
            Assert.False(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.ConditionalLogicParent(AGHeader.NameOnForm).IsPresent);
            Assert.False(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.ConditionalLogicParent(AGContinue.NameOnForm).IsPresent);
            Assert.False(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.ConditionalLogicParent(AGConribution.NameOnForm).IsPresent);
            Assert.False(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.ConditionalLogicParent(AGUpload.NameOnForm).IsPresent);
            Assert.False(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.ConditionalLogicParent(AGAlways.NameOnForm).IsPresent);
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.Cancel_Click();

            AgendaItem_CheckBox AG2 = new AgendaItem_CheckBox("AG2");
            AgendaItem_CheckBox AG3 = new AgendaItem_CheckBox("AG3");
            AG3.ConditionalLogic.Add(AG2.NameOnForm);

            KeywordProvider.AddAgendaItem.AddAgendaItems(AG2, evt);
            KeywordProvider.AddAgendaItem.AddAgendaItems(AG3, evt);
            PageObject.Builder.RegistrationFormPages.AgendaRow row1 = new PageObject.Builder.RegistrationFormPages.AgendaRow(AG2);
            row1.Delete_Click();
            PageObject.Builder.RegistrationFormPages.AgendaRow row2 = new PageObject.Builder.RegistrationFormPages.AgendaRow(AG1);
            row2.Agenda_Click();
            PageObject.Builder.RegistrationFormPages.AgendaRow row3 = new PageObject.Builder.RegistrationFormPages.AgendaRow(AG3);
            row3.Agenda_Click();
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.ExpandConditionalLogic_Click();
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.ExpandConditionalLogic_Click();
            Assert.False(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.ConditionalLogicParent(AG2.NameOnForm).IsPresent);

            AgendaItem_CheckBox AG4 = new AgendaItem_CheckBox("AG4");
            AG4.ConditionalLogic.Add(AG3.NameOnForm);
            KeywordProvider.AddAgendaItem.AddAgendaItems(AG4, evt);

            Registrant reg1 = new Registrant(evt);
            CFResponse_Checkbox resp = new CFResponse_Checkbox();
            resp.CustomField = PICustomField;
            resp.Checked = true;
            reg1.CustomField_Responses.Add(resp);

            KeywordProvider.RegistrationCreation.Checkin(reg1);
            KeywordProvider.RegistrationCreation.PersonalInfo(reg1);
            PageObject.Register.AgendaRow row4 = PageObject.PageObjectProvider.Register.RegistationSite.Agenda.GetAgendaItem(AG1);
            Assert.True(row4.AgendaType.IsPresent);
            ((CheckBox)(PageObject.PageObjectProvider.Register.RegistationSite.Agenda.GetAgendaItem(AG3).AgendaType)).Set(true);
            Assert.True(PageObject.PageObjectProvider.Register.RegistationSite.Agenda.GetAgendaItem(AG4).AgendaType.IsPresent);

            Registrant reg2 = new Registrant(evt);

            KeywordProvider.RegistrationCreation.Checkin(reg2);
            KeywordProvider.RegistrationCreation.PersonalInfo(reg2);
            Assert.False(row4.AgendaType.IsPresent);
        }