Exemplo n.º 1
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);
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
0
        public dynamic GoToRecentItem(CMEConstants.RecentItemCategory category, string itemText)
        {
            IWebElement link = RecentItemsTbl.FindElement(By.LinkText(itemText));

            switch (category)
            {
            case CMEConstants.RecentItemCategory.Activity:
                link.Click();
                ActivityMainPage page = new ActivityMainPage(Browser);
                page.WaitForInitialize();
                return(page);


            case CMEConstants.RecentItemCategory.Project:
                return(null);
            }

            return(null);
        }