public void CFType_Select(DataCollection.FormData.CustomFieldType type)
        {
            Clickable Type = new Clickable(
                string.Format("//div[@id='divMoreFormats']//span[text()='{0}']", CustomStringAttribute.GetCustomString(type)),
                LocateBy.XPath);

            Type.WaitForDisplay();
            Type.Click();
        }
        public static void AllowCookie_Click()
        {
            Clickable Allow = new Clickable("//button[@class='ui-button ui-widget ui-corner-all ui-button-text-only dialog-allow-button']", LocateBy.XPath);

            if (Allow.IsPresent)
            {
                Utility.ThreadSleep(1);
                Allow.WaitForDisplay();
                Allow.Click();
            }
        }
        public MerchandiseRow(DataCollection.MerchandiseItem merch)
        {
            this.Merchandise = new Clickable(string.Format("//table[@id='ctl00_cph_grdFees_tblGrid']//a[text()='{0}']", merch.Name), LocateBy.XPath);

            string merchHrefAttriString = this.Merchandise.GetAttribute("href");

            string tmp = merchHrefAttriString.Split(new string[] { "=" }, StringSplitOptions.RemoveEmptyEntries)[3];
            tmp = tmp.Split(new string[] { "&" }, StringSplitOptions.RemoveEmptyEntries)[0];

            this.MerchandiseId = Convert.ToInt32(tmp);
        }
        public List<ChoiceItem> GetAgendaChoiceItem()
        {
            List<ChoiceItem> choiceItems = new List<ChoiceItem>();

            for (int i = 1; i <= PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.AgendaChoiceItemCount.Count; i++)
            {
                Clickable choiceItem = new Clickable(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.AgendaChoiceItemCount.Locator + "[" + i + "]//a", LocateBy.XPath);
                ChoiceItem choice = new ChoiceItem(choiceItem.Text);

                choiceItems.Add(choice);
            }

            return choiceItems;
        }
Exemplo n.º 5
0
 public XAuth()
 {
     Test = new Clickable("ctl00_cphDialog_xAuth_btnTest", LocateBy.Id);
     OK = new Clickable("ctl00_cphDialog_saveForm", LocateBy.Id);
     ServiceEndpointURL = new Input("ctl00_cphDialog_xAuth_txtEndpointUrl", LocateBy.Id);
     MessageToRegistration = new Input("ctl00_cphDialog_xAuth_txtMessageToRegistrant", LocateBy.Id);
     TestEmail = new Input("ctl00_cphDialog_xAuth_txtTestEmailAddress", LocateBy.Id);
     TestUserName = new Input("ctl00_cphDialog_xAuth_txtTestUserName", LocateBy.Id);
     TestPassword = new Input("ctl00_cphDialog_xAuth_txtTestPassword", LocateBy.Id);
     DescriptionForIdentifer = new Input("ctl00_cphDialog_xAuth_txtLabel", LocateBy.Id);
     ForgetPasswordUrl = new Input("ctl00_cphDialog_xAuth_txtForgetPasswordUrl", LocateBy.Id);
     TestSuccessMessage = new Label("ctl00_cphDialog_xAuth_lblSuccessMessage", LocateBy.Id);
     ValidateMemberRequirePassword = new CheckBox("ctl00_cphDialog_xAuth_chkPassword", LocateBy.Id);
     ValidateMemberByUserName = new RadioButton("ctl00_cphDialog_xAuth_rdoMembership", LocateBy.Id);
     ValidateMemberByEmail = new RadioButton("ctl00_cphDialog_xAuth_rdoEmail", LocateBy.Id);
     ErrorDIVLocator = new ElementBase("//div[@id='ctl00_cphDialog_xAuth_xAuthValSummary']", LocateBy.XPath);
 }
        public void GotoPage(FormData.Page page)
        {
            string accesskey = string.Empty;

            switch (page)
            {
                case FormData.Page.Start:
                    accesskey = "S";
                    break;

                case FormData.Page.PI:
                    accesskey = "I";
                    break;

                case FormData.Page.Agenda:
                    accesskey = "H";
                    break;

                case FormData.Page.LodgingTravel:
                    accesskey = "L";
                    break;

                case FormData.Page.Merchandise:
                    accesskey = "M";
                    break;

                case FormData.Page.Checkout:
                    accesskey = "K";
                    break;

                case FormData.Page.Confirmation:
                    accesskey = "C";
                    break;

                default:
                    break;
            }

            Clickable Page = new Clickable(string.Format("//a[@accesskey='{0}']", accesskey), LocateBy.XPath);
            Page.WaitForDisplay();
            Page.Click();
            WaitForLoad();
            UIUtil.DefaultProvider.HideActiveSpecificFooter(true);
        }
Exemplo n.º 7
0
        public EventList_EventRow(int eventId)
        {
            this.EventId = eventId;

            this.Tr = new ElementBase(
                string.Format("//table[@id='ctl00_ctl00_cphDialog_cpMgrMain_rdgrdgrdForms_ctl00']/tbody/tr[@data-id='{0}']", eventId),
                LocateBy.XPath);

            string[] idAttribute = Tr.GetAttribute("id").Split(new char[] { '_' }, StringSplitOptions.RemoveEmptyEntries);
            this.RowIndex = Convert.ToInt32(idAttribute[idAttribute.Length - 1]) + 1;

            this.Title = new Clickable(
                string.Format("{0}/td/a[@class='listEventTile']", this.Tr.Locator),
                LocateBy.XPath);

            this.Delete = new Clickable(
                string.Format("{0}/td/div[@class='actions']/a[@title='Delete event']", this.Tr.Locator),
                LocateBy.XPath);

            this.EventURL = new Clickable(
                string.Format("{0}/td//a[contains(@title,'regonline.com')]", this.Tr.Locator),
                LocateBy.XPath).GetAttribute("href");
        }
Exemplo n.º 8
0
        public void CommonlyUsedItem_Click(FormData.CommonlyUsedMultipleChoice choiceItem)
        {
            Clickable item = new Clickable(string.Format("//div[@id='divPredefinedTypes']/div[text()='{0}']",
                CustomStringAttribute.GetCustomString(choiceItem)), LocateBy.XPath);

            item.WaitForDisplay();
            item.Click();
            Utility.ThreadSleep(1);
            WaitForAJAX();
        }
Exemplo n.º 9
0
        public CodeRow(CustomFieldCode code)
        {
            this.Code = new Clickable(string.Format("//table[@id='tblCodes']//*[contains(text(),'{0}')]", code.CodeString), LocateBy.XPath);

            string OnClickAttributeOfCode = this.Code.GetAttribute("onclick");

            string tmp = OnClickAttributeOfCode.Split(new string[] { "'" }, StringSplitOptions.RemoveEmptyEntries)[1];

            this.CodeId = Convert.ToInt32(tmp);
        }
Exemplo n.º 10
0
        public AgendaRow(DataCollection.AgendaItem agendaItem)
        {
            Label agendaNameTd = new Label(string.Format("//span[@class='bold'][text()='{0}']/..", agendaItem.NameOnForm), LocateBy.XPath);
            string agendaNameOnclickAttriText = agendaNameTd.GetAttribute("onclick");
            int agendaItemId = Convert.ToInt32(agendaNameOnclickAttriText.Split(new string[] { "'" }, StringSplitOptions.RemoveEmptyEntries)[1]);

            this.Agenda = new Clickable(string.Format("//*[@id='listGridTD{0}2']", agendaItemId), LocateBy.XPath);
            this.Delete = new Clickable(string.Format("//*[@id='listGridTD{0}5']//img[@title='Copy']/../../following-sibling::*//img", agendaItemId), LocateBy.XPath);
            this.Copy = new Clickable(string.Format("//*[@id='listGridTD{0}5']//img[@title='Copy']", agendaItemId), LocateBy.XPath);
        }
Exemplo n.º 11
0
        public AgendaRow(AgendaItem agenda)
        {
            agenda.Id = this.GetAgendaItemId(agenda);
            this.AgendaLabel = this.GetAngedaLabel(agenda);

            switch (agenda.Type)
            {
                case FormData.CustomFieldType.AlwaysSelected:
                    this.AgendaType = new CheckBox(agenda.Id.ToString(), LocateBy.Id);
                    this.DiscountCodeInput = new Input("dc" + agenda.Id.ToString(), LocateBy.Id);
                    this.GetAgendaDate(agenda);
                    this.GetAgendaLocation(agenda);
                    this.GetAgendaPrice(agenda);
                    break;

                case FormData.CustomFieldType.CheckBox:
                    this.AgendaType = new CheckBox(agenda.Id.ToString(), LocateBy.Id);
                    this.DiscountCodeInput = new Input("dc" + agenda.Id.ToString(), LocateBy.Id);
                    this.LimitFullMessage = new Label(string.Format("//li[@data-id='{0}']//div[@class='capacityMsg']", agenda.Id.ToString()), LocateBy.XPath);
                    this.WaitlistMessage = new Label(string.Format("//li[@data-id='{0}']//span[@class='wlist']", agenda.Id.ToString()), LocateBy.XPath);
                    this.Details = new Clickable(string.Format("//li[@data-id='{0}']//span/a[@href]", agenda.Id.ToString()), LocateBy.XPath);
                    this.GetAgendaDate(agenda);
                    this.GetAgendaLocation(agenda);
                    this.GetAgendaPrice(agenda);
                    break;

                case FormData.CustomFieldType.RadioButton:
                    this.DiscountCodeInput = new Input("dc" + agenda.Id.ToString(), LocateBy.Id);
                    this.GetAgendaDate(agenda);
                    this.GetAgendaLocation(agenda);
                    this.GetAgendaPrice(agenda);
                    break;

                case FormData.CustomFieldType.Dropdown:
                    this.AgendaType = new MultiChoiceDropdown(string.Format("//select[@id='{0}']", agenda.Id.ToString()), LocateBy.XPath);
                    this.DiscountCodeInput = new Input("dc" + agenda.Id.ToString(), LocateBy.Id);
                    this.GetAgendaDate(agenda);
                    this.GetAgendaLocation(agenda);
                    this.GetAgendaPrice(agenda);
                    break;

                case FormData.CustomFieldType.Number:
                case FormData.CustomFieldType.OneLineText:
                case FormData.CustomFieldType.Contribution:
                case FormData.CustomFieldType.Paragraph:
                case FormData.CustomFieldType.Date:
                case FormData.CustomFieldType.Time:
                case FormData.CustomFieldType.Duration:
                    this.AgendaType = new Input(agenda.Id.ToString(), LocateBy.Id);
                    break;

                case FormData.CustomFieldType.FileUpload:
                    this.AgendaType = new Clickable(
                        string.Format("//li[@data-id='{0}']//a[@class='add_button']", agenda.Id.ToString()),
                        LocateBy.XPath);

                    this.GetAgendaLocation(agenda);
                    this.GetAgendaPrice(agenda);
                    break;

                case FormData.CustomFieldType.SectionHeader:
                    break;

                case FormData.CustomFieldType.ContinueButton:
                    this.AgendaType = new Clickable(string.Format("ctl00${0}", agenda.Id.ToString()), LocateBy.Name);
                    break;

                default:
                    break;
            }
        }
        public PICustomFieldRow(string name)
        {
            this.CustomFIeldName = name;

            this.CustomFieldTitle = new Clickable(
                string.Format("//table[@id='ctl00_cph_grdCustomFieldPersonal_tblGrid']//a[text()='{0}']", this.CustomFIeldName),
                LocateBy.XPath);

            string customFieldHrefAttributeText = this.CustomFieldTitle.GetAttribute("href");

            string tmp = customFieldHrefAttributeText.Split(new string[] { "&" }, StringSplitOptions.RemoveEmptyEntries)[2];
            tmp = tmp.Split(new string[] { "=" }, StringSplitOptions.RemoveEmptyEntries)[1];

            this.CustomFieldId = Convert.ToInt32(tmp);
        }
        public void GoToPage(DataCollection.FormData.RegisterPage registerPage)
        {
            Clickable pageLink = new Clickable(
                string.Format("//a[contains(@id,'StepBar')][text()='{0}']",
                CustomStringAttribute.GetCustomString(registerPage)), LocateBy.XPath);

            pageLink.WaitForDisplay();
            pageLink.Click();
            Utility.ThreadSleep(2);
            WaitForAJAX();
            WaitForLoad();
        }
Exemplo n.º 14
0
        public RegTypeRow(string regTypeName)
        {
            this.RegTypeName = regTypeName;

            this.Title = new Clickable(
                string.Format("//table[@id='ctl00_cph_grdRegTypes_tblGrid']/tbody/tr/td/a[text()='{0}']", this.RegTypeName),
                LocateBy.XPath);

            string regTypeHrefAttributeText = this.Title.GetAttribute("href");

            string tmp = regTypeHrefAttributeText.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries)[1];
            tmp = tmp.Split(new string[] { "(" }, StringSplitOptions.RemoveEmptyEntries)[1];
            tmp = tmp.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries)[1];
            tmp = tmp.Split(new string[] { "&" }, StringSplitOptions.RemoveEmptyEntries)[2];
            tmp = tmp.Split(new string[] { "=" }, StringSplitOptions.RemoveEmptyEntries)[1];

            this.RegTypeId = Convert.ToInt32(tmp);
        }
Exemplo n.º 15
0
        public void Folder_Click(string folderName)
        {
            string folderLocator = string.Format("//div[@id='tree']//span[text()='{0}']", folderName);
            Clickable Folder = new Clickable(folderLocator, LocateBy.XPath);
            Folder.WaitForDisplay();
            string folderDivClassAttribute = UIUtil.DefaultProvider.GetAttribute(string.Format("{0}/parent::div", folderLocator), "class", LocateBy.XPath);

            if (!folderDivClassAttribute.Equals("rtMid rtSelected"))
            {
                Folder.WaitForDisplay();
                Folder.Click();
                WaitForAJAX();
                Utility.ThreadSleep(1);
            }
        }
Exemplo n.º 16
0
        public void EventType_Select(DataCollection.FormData.FormType formType)
        {
            Clickable EventType = new Clickable(string.Format("//div[@id='createNewEvent']//span[text()='{0}']", CustomStringAttribute.GetCustomString(formType)), LocateBy.XPath);

            EventType.WaitForDisplay();
            EventType.Click();
            Utility.ThreadSleep(2);
            WaitForAJAX();
            WaitForLoad();
            UIUtil.DefaultProvider.HideActiveSpecificFooter(true);
        }
Exemplo n.º 17
0
 public void DashboardTab_Click(FormData.DashboardTab tab)
 {
     Clickable targetTab = new Clickable(CustomStringAttribute.GetCustomString(tab), LocateBy.LinkText);
     targetTab.WaitForDisplay();
     targetTab.Click();
     Utility.ThreadSleep(2);
     WaitForAJAX();
     WaitForLoad();
 }