/// <summary>
        /// Goes to the Publishing Details tab, clicks on the X icon of a user-specified catalog in the Selected Catalogs table and then waits for
        /// catalog to be added to the Available Catalogs table
        /// </summary>
        /// <param name="catalogName">The name of the activity</param>
        /// <returns></returns>
        public void RemoveCatalogFromActivity(string catalogName)
        {
            ClickAndWait(PubDetailsTab);

            IWebElement row = ElemGet_CME360.Grid_GetRowByRowName(PubDetailsTabSelCatTbl, Bys.ActivityMainPage.PubDetailsTabSelCatTblBodyRow,
                                                                  catalogName, "td");

            ElemSet_CME360.Grid_ClickElementWithoutTextInsideRow(row, "input", "Remove");

            this.WaitUntil(Criteria.ActivityMainPage.PubDetailsTabSelectedCatTblRemoveCatLoadElemVisible);
            this.WaitUntil(Criteria.ActivityMainPage.PubDetailsTabSelectedCatTblRemoveCatLoadElemNotVisible);
        }
Esempio n. 2
0
        /// <summary>
        /// Clicks on the pencil icon of a user-specified activity and then waits for the main activity page to looad
        /// </summary>
        /// <param name="activityName">The full name of the activity</param>
        /// <returns></returns>
        public ActivityMainPage GoToActivity(string activityName)
        {
            IWebElement row = ElemGet_CME360.Grid_GetRowByRowName(ActivitiesTbl, Bys.SearchResultsPage.ActivitiesTblBodyRow,
                                                                  activityName, "td");

            ElemSet_CME360.Grid_ClickElementWithoutTextInsideRow(row, "img", "Edit");

            ActivityMainPage page = new ActivityMainPage(Browser);

            page.WaitForInitialize();

            return(page);
        }
Esempio n. 3
0
        /// <summary>
        /// Clicks on either the pencil or X button for a user specified portal
        /// </summary>
        /// <param name="portalName">The portal name</param>
        /// <param name="button">"Edit" to click on the Pencil button, "Delete" to click on the X button or "View"</param>
        /// <returns></returns>
        public void RemoveCatalog(string portalName, string tagName, string button)
        {
            //ClickAndWait(PortalsLnk);
            IWebElement row = ElemGet_CME360.Grid_GetRowByRowName(PortalTbl2, Bys.PortalPage.PortalTblBodyRow2,
                                                                  portalName, "td");

            ElemSet_CME360.Grid_ClickElementWithoutTextInsideRow(row, tagName, button);

            //PortalPage page = new PortalPage(Browser);
            //page.WaitForInitialize();

            return;
        }
Esempio n. 4
0
        /// <summary>
        /// Clicks on either the pencil or X button for a user specified portal
        /// </summary>
        /// <param name="portalName">The portal name</param>
        /// <param name="button">"Edit" to click on the Pencil button, "Delete" to click on the X button or "View"</param>
        /// <returns></returns>
        public PortalPage GoToPortalDetails(string portalName, string tagName, string button)
        {
            //ClickAndWait(PortalsLnk);
            IWebElement row = ElemGet_CME360.Grid_GetRowByRowName(PortalTbl, Bys.DistributionPage.PortalTblBodyRow,
                                                                  portalName, "td");

            ElemSet_CME360.Grid_ClickElementWithoutTextInsideRow(row, tagName, button);

            PortalPage page = new PortalPage(Browser);

            page.WaitForInitialize();

            return(page);
        }
        /// <summary>
        /// Goes to the Publishing Details tab, clicks on the pencil icon of a user-specified portal in the Portal table, enters user-specified text
        /// into the Custom Fee field, then clicks
        /// on Save
        /// </summary>
        /// <param name="portalName">the portal name</param>
        /// <param name="customFee">The custom fee you want to add</param>
        public void ChangeCustomFee(string portalName, string customFee)
        {
            ClickAndWait(PubDetailsTab);

            IWebElement row = ElemGet_CME360.Grid_GetRowByRowName(PubDetailsTabPortalsTbl, Bys.ActivityMainPage.PubDetailsTabPortalsTblBodyRow,
                                                                  portalName, "td");

            ElemSet_CME360.Grid_ClickElementWithoutTextInsideRow(row, "input", "Edit");

            this.WaitUntil(Criteria.ActivityMainPage.EditPortalFormCustomFeeTxtVisible);

            EditPortalFormCustomFeeTxt.Clear();

            EditPortalFormCustomFeeTxt.SendKeys(customFee);

            ClickAndWait(EditPortalFormSaveBtn);
        }
Esempio n. 6
0
        /// <summary>
        /// Clicks on Manage Activities, enters user-specified text into the Search text box, clicks Search, click the Pencil icon
        /// and waits for the Activity page to load
        /// </summary>
        /// <param name="activitySearchText">The text you want to enter in the search text box. Note that CME360 has a bug where a lot of searches dont work. So you have to make your search text short</param>
        /// <param name="activityName">The full name of the activity</param>
        /// <returns></returns>
        public ActivityMainPage GoToEditActivity(string activitySearchText, string activityName)
        {
            ClickAndWait(ManageActivitiesLnk);

            ActivitiesSearchTxt.SendKeys(activitySearchText);
            ClickAndWait(ActivitiesSearchBtn);

            IWebElement row = ElemGet_CME360.Grid_GetRowByRowName(ManageActivitiesTbl, Bys.ProjectsPage.ManageActivitiesTblBodyRow,
                                                                  activityName, "td");

            ElemSet_CME360.Grid_ClickElementWithoutTextInsideRow(row, "img", "Edit");

            ActivityMainPage page = new ActivityMainPage(Browser);

            page.WaitForInitialize();

            return(page);
        }
        /// <summary>
        /// Goes to the Publishing Details tab. If the catalog is not added to the activity, then this searches for the catalog in the available table,
        /// clicks on the plus icon of this catalog, and then waits for catalog to be added to the Selected Catalogs table
        /// </summary>
        /// <param name="catalogName">The name of the activity</param>
        /// <returns></returns>
        public void AddCatalogToActivity(string catalogName)
        {
            ClickAndWait(PubDetailsTab);

            // If the catalog is not in the selected table, then add it
            if (!ElemGet.Grid_ContainsRecord(Browser, PubDetailsTabSelCatTbl, Bys.ActivityMainPage.PubDetailsTabSelCatTblBodyRow, 1, catalogName, "td"))
            {
                // If the catalog is not showing on the 1st page of the available table, then search for it
                if (ElemGet.Grid_ContainsRecord(Browser, PubDetailsTabAvailCatTblBodyRow, Bys.ActivityMainPage.PubDetailsTabAvailCatTblBodyRow, 1,
                                                catalogName, "td"))
                {
                    SearchForAvailableCatalog(catalogName);
                }

                IWebElement row = ElemGet_CME360.Grid_GetRowByRowName(PubDetailsTabAvailCatTbl, Bys.ActivityMainPage.PubDetailsTabAvailCatTblBodyRow,
                                                                      catalogName, "td");

                ElemSet_CME360.Grid_ClickElementWithoutTextInsideRow(row, "input", "Add");

                this.WaitUntil(Criteria.ActivityMainPage.PubDetailsTabAvailCatTblAddCatLoadElemVisible);
                this.WaitUntil(Criteria.ActivityMainPage.PubDetailsTabAvailCatTblAddCatLoadElemNotVisible);
            }
        }