예제 #1
0
        public void UserCanDeleteActivityOnMyMOCPage()
        {
            /// 1. Create a Mainport user and Login
            UserInfo        NewUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.Mainport, UserUtils.UserRole.MP);
            LoginPage       LP      = Navigation.GoToLoginPage(browser);
            MyDashboardPage DP      = LP.LoginAsNewUser(UserUtils.UserRole.MP, NewUser.Username, ConfigurationManager.AppSettings["LoginPassword"]);

            /// 2. Enter 2 activities
            EnterCPDActivityPage EAP = DP.ClickAndWait(DP.EnterACPDActivityBtn);
            Activity             ConferenceActivity = EAP.AddActivityThenSubmit(Constants.MainportActivityTypes.Sec1_Conference_IfNotAccreditedCutCreditsInHalf, "10", false);

            DP.ClickAndWait(DP.EnterACPDActivityBtn);
            Activity ConferenceActivity2 = EAP.AddActivityThenSubmit(Constants.MainportActivityTypes.Sec1_Conference_IfNotAccreditedCutCreditsInHalf, "10", false);

            // Have to wait for the credits to be applied before we can proceed
            MainportHelperMethods.WaitForCreditsToBeApplied(browser, DP, Bys.MyDashboardPage.TotalCreditsAppliedValueLbl, "10");

            /// 3. On the My MOC page, open the View Activity form, click the X button for an activity, and verify that it got removed from the table
            MyMOCPage MP = DP.ClickAndWaitBasePage(DP.MyMOCTab);

            MP.OpenViewActivitiesForm(MP.GroupLearnTblUnaccrActRowViewLnk);
            IWebElement row = ElemGet.Grid_GetRowByRowName(MP.ViewActivitiesFormActivitiesTbl, Bys.MyMOCPage.ViewActivitiesFormActivitiesTblBodyRow,
                                                           ConferenceActivity.ActivityName, "td");

            ElemSet.Grid_ClickElementWithoutTextInsideRow(row, "input");
            MP.ClickAndWait(MP.DeleteActivityWarningFormYesBtn);
            Assert.False(ElemGet.Grid_ContainsRecord(Browser, MP.ViewActivitiesFormActivitiesTbl, Bys.MyMOCPage.ViewActivitiesFormActivitiesTblBodyRow, 0,
                                                     ConferenceActivity.ActivityName, "td"));
        }
        public void ReflectionShowsInTableAfterAdded()
        {
            // TEMPORARY: When the Delete User API is developed, we can remove the below code and uncomment the code below it, which creates new users
            // on the fly. Decide this when the delete API is complete
            /// 1. Login as a learner
            LoginPage      LP  = Navigation.GoToLoginPage(browser);
            CBDLearnerPage CLP = LP.LoginAsExistingUser(UserUtils.UserRole.LR, UserUtils.Learner1Login, ConfigurationManager.AppSettings["LoginPassword"]);

            /// 2. Add a reflection
            LearnerRelectionObject LR = CLP.AddReflection();

            /// 3. Switch to the Reflection tab and verify the reflection is shown in the table
            CLP.SwitchToTab(CLP.ReflectionsTab, Bys.CBDLearnerPage.ReflectionsTab);
            Assert.True(ElemGet.Grid_ContainsRecord(browser, CLP.ReflectionsTbl, Bys.CBDLearnerPage.ReflectionsTblBdy, 0, LR.ReflectionTitle, "td",
                                                    Bys.CBDLearnerPage.TableFirstBtn, Bys.CBDLearnerPage.TableNextBtn));

            ///// 1. Login as learner
            //LoginPage LP = Navigation.GoToLoginPage(browser);
            //UserInfo LRUser = UserUtils.CreateAndRegisterUser(null, UserUtils.Application.CBD, UserUtils.UserRole.LR);
            //CBDLearnerPage CLP = LP.Login(UserUtils.UserRole.LR, LRUser.Username, LRUser.Password, false);

            ///// 2. Add a reflection
            //LearnerRelectionObject LR = CLP.AddReflection();

            ///// 3. Switch to the Reflection tab and verify the reflection is shown in the table
            //CLP.SwitchToTab(CLP.ReflectionsTab, Bys.CBDLearnerPage.ReflectionsTab);
            //Assert.True(ElemGet.Grid_ContainsRecord(browser, CLP.ReflectionsTbl, LR.ReflectionTitle, Bys.CBDLearnerPage.TableFirstBtn, Bys.CBDLearnerPage.TableNextBtn));
        }
        public void UIUpdatesAfterLearnerAddsReflection()
        {
            /// 1. Create learner user and login
            LoginPage LP = Navigation.GoToLoginPage(browser);

            LRUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.CBD, UserUtils.UserRole.LR);
            CBDLearnerPage CLP = LP.LoginAsNewUser(UserUtils.UserRole.LR, LRUser.Username, LRUser.Password);

            /// 2. Store the number from the label text of the Reflections tab, and also "Showing" label, for the purpose of a future Assert within this
            /// test. If there are no Reflections yet, this showing label will not appear, so skip it if so
            CLP.SwitchToTab(CLP.ReflectionsTab, Bys.CBDLearnerPage.ReflectionsTab);
            string origNumbOfReflectionsOnReflectionsTab = DataUtils.GetStringBetweenCharacters(CLP.ReflectionsTab.Text, "(", ")");

            if (browser.Exists(Bys.CBDLearnerPage.ShowingLbl, ElementCriteria.IsVisible))
            {
                string origNumbOfReflectionsOnShowingLbl = DataUtils.GetStringAfterCharacter(CLP.ShowingLbl.Text, "f", 2);
            }

            /// 3. Add a reflection
            LearnerRelectionObject LR = CLP.AddReflection();

            /// 4. Assert that the Reflections tab label increased by 1
            Assert.AreEqual(Int32.Parse(origNumbOfReflectionsOnReflectionsTab) + 1, Int32.Parse(DataUtils.GetStringBetweenCharacters(CLP.ReflectionsTab.Text, "(", ")")));

            /// 5. Assert that the label within the Reflections tab increased by 1
            // Bug RCPSC-264: "Learner->Add Reflection: "Showing" label does not update after learner adds reflection"
            // Uncomment and run the test when fixed
            if (browser.Exists(Bys.CBDLearnerPage.ShowingLbl, ElementCriteria.IsVisible))
            {
                //Assert.AreEqual(Int32.Parse(origNumbOfReflectionsOnShowingLbl) + 1, Int32.Parse(DataUtils.GetStringAfterCharacter(CLP.ShowingLbl.Text, "f", 2)));
            }

            /// 5. Assert that the table contains the reflection
            Assert.True(ElemGet.Grid_ContainsRecord(browser, CLP.ReflectionsTbl, Bys.CBDLearnerPage.ReflectionsTblBdy, LR.ReflectionTitle, "td", Bys.CBDLearnerPage.TableFirstBtn, Bys.CBDLearnerPage.TableNextBtn));
        }
예제 #4
0
        public void ActivityAwaitingValidationShowsInCoorespondingTable()
        {
            /// 1. Create a Mainport user and Login
            UserInfo        NewUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.Mainport, UserUtils.UserRole.MP);
            LoginPage       LP      = Navigation.GoToLoginPage(browser);
            MyDashboardPage DP      = LP.LoginAsNewUser(UserUtils.UserRole.MP, NewUser.Username, ConfigurationManager.AppSettings["LoginPassword"]);

            /// 2. Enter an activity which requires credit validation
            EnterCPDActivityPage EAP     = DP.ClickAndWait(DP.EnterACPDActivityBtn);
            Activity             Actvity = EAP.AddActivityThenSubmit(Constants.MainportActivityTypes.Sec2_BulkJournalReadingwithTranscript_ValidationRequired, "10");

            /// 3. Click the My Holding Area table, then verify that the activity appears in the Activity Awaiting Credit Validation table
            MyHoldingAreaPage MP = DP.ClickAndWaitBasePage(DP.MyHoldingAreaTab);

            Assert.True(ElemGet.Grid_ContainsRecord(browser, MP.AwaitingCredValidationTbl, Bys.MyHoldingAreaPage.AwaitingCredValidationTblBody, 0,
                                                    Actvity.ActivityName, "a"));
        }
예제 #5
0
        public void UserCanCreateAGoal()
        {
            // Remove this if statement when bug https://code.premierinc.com/issues/browse/RCPSC-793 is fixed
            if (BrowserName == BrowserNames.Chrome)
            {
                /// 1. Create a Mainport user and Login
                UserInfo        NewUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.Mainport, UserUtils.UserRole.MP);
                LoginPage       LP      = Navigation.GoToLoginPage(browser);
                MyDashboardPage DP      = LP.LoginAsNewUser(UserUtils.UserRole.MP, NewUser.Username, ConfigurationManager.AppSettings["LoginPassword"]);

                /// 2. Click the Add a Goal button, fill in the information, click Next, then click Close
                string goalName = DP.AddAGoal();

                /// 3. Verify that the goals table populates with this goal
                Assert.True(ElemGet.Grid_ContainsRecord(browser, DP.GoalsTbl, Bys.MyDashboardPage.GoalsTblBody, 0, goalName, "span"));
            }
        }
예제 #6
0
        public void DeclinedExpiredTableUpdatesAfterObserverMakesChanges()
        {
            /// 1. Create learner and observer users and login as a learner
            LoginPage LP = Navigation.GoToLoginPage(browser);
            // We are using a try catch here for the following reason. This test sometimes is the very first test that gets run during the build. For some reason, the
            // RegisterUser API fails to complete and throws a 500 error whenever the first test gets set off on the grid. So if the error happens, then we will
            // just call the API again in the Catch block and proceed
            UserInfo LRUser = null;

            try
            {
                LRUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.CBD, UserUtils.UserRole.LR);
            }
            catch
            {
                LRUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.CBD, UserUtils.UserRole.LR);
            }
            OBUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.CBD, UserUtils.UserRole.OB);
            CBDLearnerPage CLP = LP.LoginAsNewUser(UserUtils.UserRole.LR, LRUser.Username, LRUser.Password);

            /// 2. Request an observation from the observer
            CLP.RequestObservationForEPA("Transition to Discipline",
                                         "Performing preoperative assessments for ASA 1 or 2 patients who will be undergoing a minor scheduled surgical procedure",
                                         OBUser.FullName, "Part A: Direct observation - Form 1");

            /// 3. Log out and then log in as the observer that the learner requested
            CLP.ClickAndWaitBasePage(CLP.LogoutLnk);
            Navigation.GoToLoginPage(browser);
            CBDObserverPage OP = LP.LoginAsNewUser(UserUtils.UserRole.OB, OBUser.Username, OBUser.Password);

            /// 4. Decline the Pending observation request
            OP.AcceptOrDeclineAssignment(LRUser.FullName, "Part A: Direct observation - Form 1", "Decline");
            OP.ExpandTable(OP.ExpiredDeclinedTblHdr, "", "expand");
            Assert.True(ElemGet.Grid_ContainsRecord(Browser, OP.ExpiredDeclinedTbl, Bys.CBDObserverPage.ExpiredDeclinedTblRowBody, 0,
                                                    LRUser.FullName, "td"));

            /// 5. Remove the declined request and verify that the table disappears. The table should disappear at this point
            /// because there was only 1 declined request to begin with
            OP.RemoveExpiredDeclinedRequest(LRUser.FullName, "Part A: Direct observation - Form 1");
            Assert.True(browser.FindElements(Bys.CBDObserverPage.ExpiredDeclinedTblRowBody).Count == 0);

            /// 6. Switch to the Archived Observations tab and verify that the request shows there
            OP.SwitchToTab(OP.ArchivedObsTab);
            Assert.True(ElemGet.Grid_ContainsRecord(Browser, OP.ArchivedObservationsTbl, Bys.CBDObserverPage.ArchivedObservationsTblRowBody, 0,
                                                    LRUser.FullName, "td"));
        }
예제 #7
0
        public void ObserverGetsObservationRequestFromLearner()
        {
            // TEMPORARY: When the Delete User API is developed, we can remove the below code and uncomment the code below it, which creates new users
            // on the fly. Decide this when the delete API is complete
            /// 1. Login as a learner
            LoginPage      LP  = Navigation.GoToLoginPage(browser);
            CBDLearnerPage CLP = LP.LoginAsExistingUser(UserUtils.UserRole.LR, UserUtils.Learner1Login, ConfigurationManager.AppSettings["LoginPassword"]);

            /// 2. Request an observation from the observer
            CLP.RequestObservationForEPA("Transition to Discipline",
                                         "Performing preoperative assessments for ASA 1 or 2 patients who will be undergoing a minor scheduled surgical procedure",
                                         UserUtils.Observer1FullName, "Part A: Direct observation - Form 1");

            /// 3. Log out and then log in as the observer that the learner requested
            CLP.ClickAndWaitBasePage(CLP.LogoutLnk);
            Navigation.GoToLoginPage(browser);
            CBDObserverPage OP = LP.LoginAsExistingUser(UserUtils.UserRole.OB, UserUtils.Observer1Login, ConfigurationManager.AppSettings["LoginPassword"]);

            /// 4. Check that the observation that was just created is now in the Pending Acceptance table
            Assert.True(ElemGet.Grid_ContainsRecord(browser, OP.PendingAcceptanceTbl, Bys.CBDObserverPage.PendingAcceptanceTblRowBody, 0,
                                                    UserUtils.Learner1FullName, "td"),
                        "The observation that was requested from the learner is not showing in the Observer's Pending Acceptance table");



            ///// 1. Create learner and observer users and login as the learner
            //LoginPage LP = Navigation.GoToLoginPage(browser);
            //LRUser = UserUtils.CreateAndRegisterUser(null, UserUtils.Application.CBD, UserUtils.UserRole.LR);
            //OBUser = UserUtils.CreateAndRegisterUser(null, UserUtils.Application.CBD, UserUtils.UserRole.OB);
            //CBDLearnerPage CLP = LP.LoginAsNewUser(UserUtils.UserRole.LR, LRUser.Username, LRUser.Password);

            ///// 2. Request an observation from the observer
            //CLP.RequestObservationForEPA(CLP.EPAIMTbl, "Transition to Discipline",
            //    "Performing preoperative assessments for ASA 1 or 2 patients who will be undergoing a minor scheduled surgical procedure",
            //    OBUser.FullName, "Part A: Direct observation - Form 1");

            ///// 3. Log out and then log in as the observer that the learner requested
            //CLP.ClickAndWaitBasePage(CLP.LogoutLnk);
            //Navigation.GoToLoginPage(browser);
            //CBDObserverPage OP = LP.LoginAsNewUser(UserUtils.UserRole.OB, OBUser.Username, OBUser.Password);

            ///// 4. Check that the observation that was just created is now in the Pending Acceptance table
            //Assert.True(ElemGet.Grid_ContainsRecord(browser, OP.PendingAcceptanceTbl, LRUser.FullName, null));
        }
예제 #8
0
        public void UserCanDeleteActivityFromMyHoldingArea()
        {
            /// 1. Create a Mainport user and Login
            UserInfo        NewUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.Mainport, UserUtils.UserRole.MP);
            LoginPage       LP      = Navigation.GoToLoginPage(browser);
            MyDashboardPage DP      = LP.LoginAsNewUser(UserUtils.UserRole.MP, NewUser.Username, ConfigurationManager.AppSettings["LoginPassword"]);

            /// 2. Click the Enter a CPD Activity button, fill in the fields, click Continue, then click Send to Holding Area, then click Close
            EnterCPDActivityPage EAP = DP.ClickAndWait(DP.EnterACPDActivityBtn);
            Activity             ConferenceActivity = EAP.AddActivityThenSendToHoldingArea(Constants.MainportActivityTypes.Sec1_Conference_IfNotAccreditedCutCreditsInHalf,
                                                                                           "10", true);

            /// 3. Click the My Holding Area tab, click the X button to delete the activity, then verify that it disappears from the Incomplete Activites table
            MyHoldingAreaPage MP = DP.ClickAndWaitBasePage(DP.MyHoldingAreaTab);

            MP.DeleteActivity(ConferenceActivity.ActivityName);
            Assert.False(ElemGet.Grid_ContainsRecord(browser, MP.IncompleteActivitiesTbl, Bys.MyHoldingAreaPage.IncompleteActivitiesTblBody, 0,
                                                     ConferenceActivity.ActivityName, "a"));
        }
예제 #9
0
        public void UserCanSendActivityToHoldingAreaThenCompleteActivity()
        {
            /// 1. Create a Mainport user and Login
            UserInfo        NewUser = UserUtils.CreateAndRegisterUser(UserUtils.Application.Mainport, UserUtils.UserRole.MP);
            LoginPage       LP      = Navigation.GoToLoginPage(browser);
            MyDashboardPage DP      = LP.LoginAsNewUser(UserUtils.UserRole.MP, NewUser.Username, ConfigurationManager.AppSettings["LoginPassword"]);

            /// 2. Click the Enter a CPD Activity button, fill in the fields, click Send to Holding Area, then click Close
            /// Do this again for a second activity
            EnterCPDActivityPage EAP = DP.ClickAndWait(DP.EnterACPDActivityBtn);
            Activity             ConferenceActivity = EAP.AddActivityThenSendToHoldingArea(Constants.MainportActivityTypes.Sec1_Conference_IfNotAccreditedCutCreditsInHalf,
                                                                                           "10", true);

            DP.ClickAndWait(DP.EnterACPDActivityBtn);
            Activity ConferenceActivity2 = EAP.AddActivityThenSendToHoldingArea(Constants.MainportActivityTypes.Sec1_Conference_IfNotAccreditedCutCreditsInHalf,
                                                                                "10", true);

            /// 3. Verify that the activity shows in the My Holding Area table
            Assert.True(ElemGet.Grid_ContainsRecord(browser, DP.MyHoldingAreaTbl, Bys.MyDashboardPage.MyHoldingAreaTblBody, 0,
                                                    ConferenceActivity2.ActivityName, "span"));

            /// 4. Click the View More button underneath the My Holding Area table, then verify that the activity is showing in the
            /// Incomplete Activities. Click Complete Activity, then click the Continue button and complete the activity and verify
            /// that it disappears from the Incomplete Activites table
            MyHoldingAreaPage MP = DP.ClickAndWait(DP.ViewMoreBtn);

            Assert.True(ElemGet.Grid_ContainsRecord(browser, MP.IncompleteActivitiesTbl, Bys.MyHoldingAreaPage.IncompleteActivitiesTblBody, 0,
                                                    ConferenceActivity2.ActivityName, "a"));
            MP.ClickCompleteActivityBtn(MP.IncompleteActivitiesTbl, Bys.MyHoldingAreaPage.IncompleteActivitiesTblBodyRow, ConferenceActivity2.ActivityName);
            // Not running this in firefox. For some reason, when I enter the date in the above AddActivityThenSendToHoldingArea method, the date enters fine
            // and the activity completes, but when I open the activity from this window, then the date isnt there, so this is an automation bug. Revisit
            if (BrowserName != BrowserNames.Firefox)
            {
                EAP.ClickAndWait(EAP.ContinueBtn);
                EAP.ClickAndWait(EAP.OptionalTabSubmitBtn);
                EAP.CloseBtn.Click();
                // Very tired right now. Add dynamic wait here later
                Thread.Sleep(5000);
                browser.SwitchTo().DefaultContent();
                Assert.False(ElemGet.Grid_ContainsRecord(browser, MP.IncompleteActivitiesTbl, Bys.MyHoldingAreaPage.IncompleteActivitiesTblBody, 0,
                                                         ConferenceActivity2.ActivityName, "a"));
            }
        }
예제 #10
0
        public void NewActivityAppearsAndDisappearsFromGrid()
        {
            /// 1. Login as an existing user
            LoginPage       LP = Navigation.GoToLoginPage(browser);
            MyDashboardPage DP = LP.LoginAsExistingUser(UserUtils.UserRole.MP, UserUtils.MainportUser1Login, ConfigurationManager.AppSettings["LoginPassword"]);

            /// 2. Add an activity
            EnterCPDActivityPage EAP = DP.ClickAndWait(DP.EnterACPDActivityBtn);
            Activity             NewConferenceActivity = EAP.AddActivityThenSubmit(Constants.MainportActivityTypes.Sec1_Conference_IfNotAccreditedCutCreditsInHalf, "10", false);

            /// 3. Navigate to the My CPD Activities List page and verify that the activity got added to the the table
            MyCPDActivitiesListPage MCP = DP.ClickAndWaitBasePage(DP.MyCPDActivitiesTab);

            Assert.True(ElemGet.Grid_ContainsRecord(browser, MCP.ActivityTblBody, Bys.MyCPDActivitiesListPage.ActivityTblBody, 0,
                                                    NewConferenceActivity.ActivityName, "a"), "The activity has not been added to the grid");

            /// 4. Click the X button on the activity inside the grid, then click Ok on the popup to delete the activity, and make sure the activity
            /// disappears from the grid
            MCP.DeleteActivityFromGrid(NewConferenceActivity.ActivityName);
            Assert.False(ElemGet.Grid_ContainsRecord(browser, MCP.ActivityTblBody, Bys.MyCPDActivitiesListPage.ActivityTblBody, 0,
                                                     NewConferenceActivity.ActivityName, "a"), "The activity has not been deleted");
        }
예제 #11
0
        /// <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);
            }
        }
예제 #12
0
        public void SearchAddRemoveCatalogAndPortalDependency()
        {
            string activityName = "";

            if (BrowserName == BrowserNames.Chrome)
            {
                activityName = "TestAuto Activity 1 Chrome";
            }
            if (BrowserName == BrowserNames.InternetExplorer)
            {
                activityName = "TestAuto Activity 1 IE";
            }
            if (BrowserName == BrowserNames.Firefox)
            {
                activityName = "TestAuto Activity 1 FF";
            }

            string catalogName = "TestAuto Catalog 1";

            string portalName = "_Test Portal";

            /// 1. Login as TestAuto_TestPortal_User1
            LoginPage       LP  = Navigation.GoToLoginPage(browser);
            MyDashboardPage MDP = LP.Login("TestAuto_TestPortal_User1", "password");

            /// 2. Open the "TestAuto Activity 1" activity
            SearchResultsPage SP  = MDP.Search(activityName);
            ActivityMainPage  AMP = SP.GoToActivity(activityName);

            /// 3. Go to the Publishing Details and do a search for "TestAuto Catalog 1" and verify that it shows in the available table
            // First, we should check to make sure that this catalog is not in the Selected table (if it is, then the test failed at some point, and didnt reach
            // the part of the test where it moves the catalog back to the available list). So if its not in the available list, then we need to put it back
            AMP.ClickAndWait(AMP.PubDetailsTab);
            if (ElemGet.Grid_ContainsRecord(browser, AMP.PubDetailsTabSelCatTbl, Bys.ActivityMainPage.PubDetailsTabSelCatTblBodyRow, 1,
                                            catalogName, "td"))
            {
                AMP.RemoveCatalogFromActivity(catalogName);
            }
            AMP.SearchForAvailableCatalog(catalogName);
            Assert.True(ElemGet.Grid_ContainsRecord(browser, AMP.PubDetailsTabAvailCatTbl, Bys.ActivityMainPage.PubDetailsTabAvailCatTblBodyRow, 1,
                                                    "TestAuto Catalog 1", "td", Bys.ActivityMainPage.PubDetailsTabAvailCatTblFirstBtn, Bys.ActivityMainPage.PubDetailsTabAvailCatTblNextBtn));

            /// 4. Click the + icon in the catalog row of the available table and verify that it gets added to the selected table and removed from
            /// the available table
            AMP.AddCatalogToActivity(catalogName);
            Assert.False(ElemGet.Grid_ContainsRecord(browser, AMP.PubDetailsTabAvailCatTbl, Bys.ActivityMainPage.PubDetailsTabAvailCatTblBodyRow, 1,
                                                     catalogName, "td", Bys.ActivityMainPage.PubDetailsTabAvailCatTblFirstBtn, Bys.ActivityMainPage.PubDetailsTabAvailCatTblNextBtn));
            Assert.True(ElemGet.Grid_ContainsRecord(browser, AMP.PubDetailsTabSelCatTbl, Bys.ActivityMainPage.PubDetailsTabSelCatTblBodyRow, 1,
                                                    catalogName, "td"));

            /// 5. Verify that the Portals table populates with the cooresponding portal that the Catalog is associated to
            Assert.True(ElemGet.Grid_ContainsRecord(browser, AMP.PubDetailsTabPortalsTbl, Bys.ActivityMainPage.PubDetailsTabPortalsTblBodyRow, 0,
                                                    portalName, "td"));

            /// 6. Click the X icon in the catalog row of the selected table and verify that it gets removed from the selected table and added to
            /// the available table. Also verify that the portal gets removed from the portals table
            AMP.RemoveCatalogFromActivity(catalogName);
            Assert.True(ElemGet.Grid_ContainsRecord(browser, AMP.PubDetailsTabAvailCatTbl, Bys.ActivityMainPage.PubDetailsTabAvailCatTblBodyRow, 1,
                                                    catalogName, "td", Bys.ActivityMainPage.PubDetailsTabAvailCatTblFirstBtn, Bys.ActivityMainPage.PubDetailsTabAvailCatTblNextBtn));
            Assert.False(ElemGet.Grid_ContainsRecord(browser, AMP.PubDetailsTabSelCatTbl, Bys.ActivityMainPage.PubDetailsTabSelCatTblBodyRow, 1,
                                                     catalogName, "td"));
            Assert.False(ElemGet.Grid_ContainsRecord(browser, AMP.PubDetailsTabPortalsTbl, Bys.ActivityMainPage.PubDetailsTabPortalsTblBodyRow, 0,
                                                     portalName, "td"));
        }