Exemplo n.º 1
0
        /// <summary>
        /// Chooses a learner in the learners table, clicks on the Actions button, clicks on Schedule Progress Meeting, fill in
        /// all of the fields with random data and clicks Submit
        /// </summary>
        /// <param name="learnerFullName"></param>
        public void ScheduleProgressMeeting(string learnerFullName)
        {
            IWebElement btn = ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, LearnersTbl, Bys.CBDProgDirectorPage.LearnersTblRowBody,
                                                                      learnerFullName, "a", "Actions", "span");

            Thread.Sleep(0500);

            IWebElement btnParent = XpathUtils.GetNthParentElem(btn, 3);

            ElemSet.Grid_ClickMenuItemInsideDropdown(Browser, btnParent, "Schedule Progress Meeting");
            Browser.WaitForElement(Bys.CBDProgDirectorPage.SchedProgMeetFormSubjectTxt, ElementCriteria.IsVisible);
            this.WaitUntilAll(Criteria.CBDProgDirectorPage.LoadElementClassAttributeSetToHide, Criteria.CBDProgDirectorPage.LoadElementDisappeared);

            ElemSet.ChkBx_ChooseRandom(Browser, UserUtils.ProgAdmin1FullName);

            ElemSet.DatePicker_ChooseDate(Browser, "19", "December", "01");

            SchedProgMeetFormSubjectTxt.SendKeys(DataUtils.GetRandomSentence(10));

            // Generate a random boolean, then use it to randomly check or uncheck the check box and select a recurring meeting or not
            Random gen       = new Random();
            bool   reccuring = gen.Next(100) <= 20 ? true : false;

            if (reccuring)
            {
                SchedProgMeetFormRecurChk.Click();
                Thread.Sleep(0300);
                ElemSet.SelElem_Single_SelectRandomItem(SchedProgMeetFormRecurringSelElem);
            }

            ClickAndWait(SchedProgMeetFormScheduleBtn);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Clicks the user-specified trainee in the Portfolios table and waits for the Dashboard for that trainee to appear
 /// </summary>
 /// <param name="traineeFullName">The trainee's first and last name</param>
 public void GoToTraineeDashboard(string traineeFullName)
 {
     ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, PortfoliosUnderReviewTbl, Bys.DiplomaDirectorPage.PortfoliosUnderReviewTblBodyRow,
                                             traineeFullName, "a", traineeFullName, "a");
     Browser.WaitForElement(Bys.DiplomaDirectorPage.MilestonesTblFirstRow);
     Thread.Sleep(0300);
 }
 /// <summary>
 /// Clicks on the Review button for a user-specified trainee and waits for the Dashboard for that trainee to appear
 /// </summary>
 /// <param name="traineeFullName">The trainee's first and last name</param>
 public void GoToTraineeDashboard(string traineeFullName)
 {
     ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, PortfolioAssignmentsTbl, Bys.DiplomaAssessorPage.PortfolioAssignmentsTblFirstRow,
                                             traineeFullName, null, "Review");
     this.WaitUntil(TimeSpan.FromMinutes(1), Criteria.DiplomaAssessorPage.MilestonesTblFirstRowEnabled);
     Thread.Sleep(0300);
 }
Exemplo n.º 4
0
        /// <summary>
        /// Changes any of the cells inside the Agenda table for a user-specified learner
        /// </summary>
        /// <param name="learnerFullName">The exact text from the cell that your learner exists within</param>
        /// <param name="reviewed">The exact text from one of the items in the select element from the Review column in the Agenda table. Enter null if you dont want this to be changed</param>
        /// <param name="agendaPriority">The exact text from one of the items in the select element from the Agenda Priority column in the Agenda table. Enter null if you dont want this to be changed</param>
        /// <param name="presenter">The exact text from one of the items in the select element from the Presenter column in the Agenda table. Enter null if you dont want this to be changed</param>
        /// <param name="learnerStatus">The exact text from one of the items in the Learner Status select element from the Set Status window. Enter null if you dont want this to be changed</param>
        /// <param name="actions">The exact text from one of the items in the Actions select element from the Set Status window. Enter null if you dont want this to be changed</param>
        public void ModifyLearnerForAgenda(string learnerFullName, string reviewed, string agendaPriority, string presenter, string learnerStatus, string actions)
        {
            if (reviewed != null)
            {
                ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, AgendaTbl, Bys.CBDProgDirectorPage.AgendaTbl, learnerFullName, null, "Not Reviewed");
                Thread.Sleep(0300);
                ElemSet.Grid_SelectItemWithinSelElem(AgendaTbl, Bys.CBDProgDirectorPage.AgendaTbl, learnerFullName, null, "ReviewStatus", reviewed);
                this.WaitUntilAll(Criteria.CBDProgDirectorPage.LoadElementClassAttributeSetToHide, Criteria.CBDProgDirectorPage.LoadElementDisappeared);
            }

            if (agendaPriority != null)
            {
                ElemSet.Grid_SelectItemWithinSelElem(AgendaTbl, Bys.CBDProgDirectorPage.AgendaTbl, learnerFullName, null, "Priority", agendaPriority);
                this.WaitUntilAll(Criteria.CBDProgDirectorPage.LoadElementClassAttributeSetToHide, Criteria.CBDProgDirectorPage.LoadElementDisappeared);
            }

            if (presenter != null)
            {
                ElemSet.Grid_SelectItemWithinSelElem(AgendaTbl, Bys.CBDProgDirectorPage.AgendaTbl, learnerFullName, null, "Presenter", presenter);
                this.WaitUntilAll(Criteria.CBDProgDirectorPage.LoadElementClassAttributeSetToHide, Criteria.CBDProgDirectorPage.LoadElementDisappeared);
            }

            if (learnerStatus != null)
            {
                SetStatusOfLearner(learnerFullName, learnerStatus, actions);
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// Clicks the Actions button inside of a user-specified row, clicks the Accept/Decline button, fills the form and either
        /// clicks the Accept or Decline button
        /// </summary>
        /// <param name="learnerName">The first and last name of the learner with the pending observation request</param>
        /// <param name="acceptOrDecline">Either "Accept" "Decline"</param>
        /// <returns></returns>
        public AcceptDeclineAssignmentFormInfo AcceptOrDeclineAssignment(string learnerName, string formName, string acceptOrDecline)
        {
            IWebElement btn = ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, PendingAcceptanceTbl, Bys.CBDObserverPage.PendingAcceptanceTblRowBody,
                                                                      learnerName, "td", "Actions", "span", formName, "span");

            Thread.Sleep(0500);

            IWebElement btnParent = XpathUtils.GetNthParentElem(btn, 3);

            ElemSet.Grid_ClickMenuItemInsideDropdown(Browser, btnParent, "Accept/Decline Assignment");

            // Wait until the Accept/Decline assesment window opens
            Browser.WaitForElement(Bys.CBDObserverPage.AccDecAssgnMntFormCommentsTxt, TimeSpan.FromSeconds(60), ElementCriteria.IsVisible, ElementCriteria.IsEnabled);
            Browser.WaitForElement(Bys.RCPPage.LoadIcon, TimeSpan.FromSeconds(60), ElementCriteria.AttributeValue("class", "page-splash dissolve-animation ng-hide")
                                   .OR(ElementCriteria.AttributeValue("class", "page-splash dissolve-animation ng-animate ng-hide")));

            AcceptDeclineAssignmentFormInfo ADFO = FillAcceptDeclineAssignmentForm();

            if (acceptOrDecline == "Accept")
            {
                ClickAndWait(AccDecAssgnMntFormAcceptBtn);
            }
            else
            {   // TOD: Add code for declining assessment
                ClickAndWait(AccDecAssgnMntFormDeclineBtn);
                ClickAndWait(ConfirmFormDeclineAssessYesBtn);
            }
            return(ADFO);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Goes to the Self Reporting tab if we are not already there, clicks the Actions>Validate link for a user-specified activity, waits for
        /// the Credit Validation page to appear, clicks the Accept radio button, clicks the Submit button, and waits for the page be done loading
        /// </summary>
        /// <param name="activityName">The exact text of the activity inside the Self Reported Activities table table that you want to click on</param>
        internal void ChooseActivityAndValidateCredi(string activityName)
        {
            ClickAndWait(SelfReportActTab);

            IWebElement btn = ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, SelfReportActTabValidActivityTbl, Bys.ProgramPage.SelfReportActTabActivityTblBodyRow,
                                                                      activityName, "td", "Actions", "span");

            Thread.Sleep(0500);

            IWebElement btnParent = XpathUtils.GetNthParentElem(btn, 3);

            ElemSet.Grid_ClickMenuItemInsideDropdown(Browser, btnParent, "Validate");
            Browser.WaitForElement(Bys.ProgramPage.CreditValidationAcceptRdo);

            CreditValidationAcceptRdo.Click();

            ClickAndWait(CreditValidationSubmitBtn);
            Thread.Sleep(0300);
            this.WaitUntil(Criteria.ProgramPage.ExternalActivityHasBeenAcceptedBannerNotExists);
            // Adding a little sleep here. For some reason, whenever the code proceeds after clicking this button (which invokes the green banner at the top),
            // the next line of code doesnt execute. For example, Navigate.GoToLoginPage. That code gets past the navigation part, but if you view the test in
            // progress, no URL is entered into the URL. Another example I have code to click on the "Sites" tab in LTS after this, and the code goes past the
            // Click line, but if you view the test, it didnt click anything. I have never seen this before. So far, I think it only happened in Debug mode.
            // Monitor going forward
            Thread.Sleep(0600);

            // Have to refresh the page sometimes so the credits appear on the details tab
            this.RefreshPage(true);
        }
 /// <summary>
 /// Clicks on the user-specified milestone link in the table from the trainee dashboard page and waits for that page to appear
 /// </summary>
 /// <param name="milestoneName">The trainee's first and last name</param>
 public void GoToSpecificMilestone(string milestoneName)
 {
     ElemSet.ScrollToElement(Browser, MilestonesInMilestonesTblLnks[0]);
     ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, MilestonesTbl, Bys.DiplomaAssessorPage.MilestonesTblFirstRow, milestoneName, null, milestoneName);
     this.WaitUntil(Criteria.DiplomaAssessorPage.MainFrameVisibleAndEnabled);
     Browser.SwitchTo().Frame(MainFrame);
     this.WaitUntil(Criteria.DiplomaAssessorPage.MarkAsAchievedBtnVisible);
 }
Exemplo n.º 8
0
        /// <summary>
        /// Clicks on a program inside the program table from the Program tab of the Participants page, then waits for the Program page to load
        /// </summary>
        /// <param name="browser">The driver instance</param>
        /// <param name="programName">The exact text from the Programs table of the program that you want to click on</param>
        /// <returns></returns>
        internal ProgramPage ClickProgramAndWait(IWebDriver browser, string programName)
        {
            ElemSet.Grid_ClickButtonOrLinkWithinRow(browser, ProgramsTabProgramTbl, Bys.ParticipantsPage.ProgramsTabProgramTblBodyRow,
                                                    programName, "a", programName, "a");
            ProgramPage page = new ProgramPage(Browser);

            page.WaitForInitialize();
            return(page);
        }
Exemplo n.º 9
0
 /// <summary>
 /// Clicks on the user-specified milestone link in the table from the trainee dashboard page and waits for that page to appear
 /// </summary>
 /// <param name="milestoneName">The trainee's first and last name</param>
 public void GoToSpecificMilestone(string milestoneName)
 {
     ElemSet.ScrollToElement(Browser, Browser.FindElements(Bys.DiplomaTraineePage.MilestonesInMilestonesTblLnks)[0]);
     ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, Browser.FindElement(Bys.DiplomaTraineePage.MilestonesTbl),
                                             Bys.DiplomaTraineePage.MilestonesTblFirstRow, milestoneName, "a", milestoneName, "a");
     this.WaitUntil(Criteria.DiplomaDirectorPage.MainFrameVisibleAndEnabled);
     Browser.SwitchTo().Frame(MainFrame);
     this.WaitUntil(Criteria.DiplomaDirectorPage.MarkAsAchievedBtnVisible);
 }
Exemplo n.º 10
0
        /// <summary>
        /// Clicks on any participant within the participant table, then waits for the Participant page to load
        /// </summary>
        /// <param name="browser">The driver instance</param>
        /// <param name="particpantName">The exact text of the link for the participant that you want to click on from the participants table</param>
        internal ParticipantsPage ClickParticpantAndWait(IWebDriver browser, string particpantName)
        {
            ElemSet.Grid_ClickButtonOrLinkWithinRow(browser, AllParticpantsTblBody, Bys.SearchPage.AllParticpantsTblBodyRow,
                                                    particpantName, "a", particpantName, "a");

            ParticipantsPage page = new ParticipantsPage(browser);

            page.WaitForInitialize();
            return(page);
        }
Exemplo n.º 11
0
        /// <summary>
        /// Clicks the Access Questionnaire button for a user-specified trainee in the Pending Surveys table, then waits for the
        /// questionnaire to open
        /// </summary>
        /// <param name="traineeFullName"></param>
        private void OpenTraineeSurveyForm(string traineeFullName)
        {
            ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, PendingSurveysTbl, Bys.PERRefereePage.PendingSurveysTblFirstRow, traineeFullName, null,
                                                    "Access Questionnaire  ");

            this.WaitUntil(TimeSpan.FromSeconds(180), Criteria.PERRefereePage.TraineeSurveyFormFrameVisible);
            Browser.SwitchTo().Frame(TraineeSurveyFormFrame);

            this.WaitUntil(TimeSpan.FromSeconds(180), Criteria.PERRefereePage.TraineeSurveyFormProfessTxtVisible);
        }
Exemplo n.º 12
0
        /// <summary>
        /// Clicks on the Complete Activity button for a user-specified activity in the user-specified table, then waits for the Enter a CPD Activity page
        /// to appear, then returns that page object
        /// </summary>
        /// <param name="tbl">The table that your activity is in</param>
        /// <param name="tblBodyRow">Any row within the table, in By form. This is just used to wait until any row loads</param>
        /// <param name="activityName">The exact text from the first column of the table for your activity, or your activity name</param>
        /// <returns></returns>
        public EnterCPDActivityPage ClickCompleteActivityBtn(IWebElement tbl, By tblBodyRow, string activityName)
        {
            ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, tbl, tblBodyRow, activityName, null, "Complete Activity");

            EnterCPDActivityPage page = new EnterCPDActivityPage(Browser);

            page.WaitForInitialize();
            Browser.SwitchTo().Frame(page.EnterACPDFrame);
            return(page);
        }
        /// <summary>
        /// Clicks on the Portfolios Under Review tab, clicks on the Mark As Achieved button for a user-specified trainee,
        /// clicks the Submit button on the confirmation popup window
        /// </summary>
        /// <param name="traineeFullName"></param>
        /// <param name="assessor1FullName"></param>
        public void MarkTraineeAsAchieved(string traineeFullName)
        {
            ClickAndWait(PortfoliosUnderReviewTab);

            ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, PortfoliosUnderReviewTbl, Bys.DiplomaCredentialStaffPage.PortfoliosUnderReviewTblFirstRow,
                                                    traineeFullName, "a", "Mark as Achieved", "button");

            this.WaitUntil(TimeSpan.FromSeconds(30), Criteria.DiplomaCredentialStaffPage.MarkPortfolioAsAchievedFormSubmitBtnVisible);

            ClickAndWait(MarkPortfolioAsAchievedFormSubmitBtn);
        }
Exemplo n.º 14
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="learnerName">The first and last name of the learner with the pending observation request</param>
        /// <param name="acceptOrDecline">Either "Accept" "Decline"</param>
        /// <returns></returns>
        public void RemoveExpiredDeclinedRequest(string learnerName, string formName)
        {
            IWebElement btn = ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, ExpiredDeclinedTbl,
                                                                      Bys.CBDObserverPage.ExpiredDeclinedTblRowBody, learnerName, "td", "Actions", "span", formName, "span");

            Thread.Sleep(0500);

            IWebElement btnParent = XpathUtils.GetNthParentElem(btn, 3);

            ElemSet.Grid_ClickMenuItemInsideDropdown(Browser, btnParent, "Remove");
            ClickAndWait(ConfirmFormRemoveAssessOkBtn);
        }
Exemplo n.º 15
0
        public void OpenCompleteAssessFormmentWindow(string learnerName, string formName)
        {
            IWebElement btn = ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, AcceptedTbl, Bys.CBDObserverPage.AcceptedTblRowBody, learnerName, "td",
                                                                      "Actions", "span", formName, "span");

            Thread.Sleep(0500);

            IWebElement btnParent = XpathUtils.GetNthParentElem(btn, 3);

            ElemSet.Grid_ClickMenuItemInsideDropdown(Browser, btnParent, "Complete Assessment");
            Browser.WaitForElement(Bys.CBDObserverPage.CompleteAssessFormFeedbackTxt, ElementCriteria.IsEnabled, ElementCriteria.IsVisible);
            Browser.WaitForElement(Bys.CBDObserverPage.CompleteAssessFormDateControlExpandBtn, ElementCriteria.IsVisible, ElementCriteria.IsEnabled);
            this.WaitForInitialize();
        }
Exemplo n.º 16
0
        /// <summary>
        /// Clicks on the Assessors tab if we are not already there, clicks the Assign Third Assessor button for a user-specified trainee, chooses
        /// a user-specified assessor, then clicks the Submit button
        /// </summary>
        /// <param name="traineeFullName">The trainee's first and last nameThe exact text of the trainee from the Trainee column inside the Trainee table on the Referee tab</param>
        /// <param name="assessor3FullName">The first and last name of the assessor</param>
        public void Assign3rdAssessor(string traineeFullName, string assessor3FullName)
        {
            ClickAndWait(AssessorTab);

            ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, AssessorTabTraineeTbl, Bys.PERCredentialStaffPage.AssessorTabTraineeTblFirstRow,
                                                    traineeFullName, "a", "Assign Third Assessor", "button");

            this.WaitUntil(TimeSpan.FromMinutes(1), Criteria.PERCredentialStaffPage.AssignAssessor3rdAssFormThirdAssSelElemHasItemsIsVisible);
            Thread.Sleep(0200);

            AssignAssessor3rdAssFormThirdAssSelElem.SelectByText(assessor3FullName);

            ClickAndWait(AssignAssessor3rdAssFormSubmitBtn);
        }
Exemplo n.º 17
0
        /// <summary>
        /// Selects "Needs Additional Information" in the Status drop down, clicks on the user-specified milestone,
        /// enters user-specified text into the "Your Reply" text box, clicks Save, then goes back to the Dashboard
        /// </summary>
        /// <param name="milestoneName">The milestone name as it appears in the text of the HTML elementThe exact text of the milestone inside the milestone table</param>
        /// <param name="additionalInfoText">The text you want to enter for the requested or submitted additional infoThe text of your choice</param>
        public void SubmitAdditionalInfo(string milestoneName, string additionalInfoText)
        {
            this.WaitUntilAny(Criteria.PERTraineePage.MilestonesTblMilestoneNameLinksEnabled);

            ElemSet.ScrollToElement(Browser, MilestonesInMilestonesTblLnks[0]);
            ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, MilestonesTbl, Bys.PERTraineePage.MilestonesTblFirstRow, milestoneName, "a", milestoneName, "a");
            this.WaitUntilAll(Criteria.PERTraineePage.EvidenceTblUpdateLinksEnabledAndVisible);

            YourReplyTxt.SendKeys(additionalInfoText);
            this.WaitUntilAll(Criteria.PERTraineePage.YourReplySaveChangesButtonVisible);

            ClickAndWait(YourReplySaveChangesBtn);

            ClickAndWait(ResubmitBtn);
        }
Exemplo n.º 18
0
        /// <summary>
        /// Clicks on the Referees tab if we are not already there, clicks the Assign Referees button for a user-specified trainee, chooses
        /// a user-specified first and second referee, then clicks the Submit button
        /// </summary>
        /// <param name="traineeFullName">The trainee's first and last nameThe exact text of the trainee from the Trainee column inside the Trainee table on the Referee tab</param>
        /// <param name="referee1FullName">The first and last name of the referee</param>
        /// <param name="referee2FullName">The first and last name of the referee</param>
        public void AssignReferees(string traineeFullName, string referee1FullName, string referee2FullName)
        {
            ClickAndWait(RefereesTab);

            ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, RefereesTabTraineeTbl, Bys.PERCredentialStaffPage.RefereesTabTraineeTblFirstRow,
                                                    traineeFullName, "a", "Assign Referee", "button");

            this.WaitUntil(TimeSpan.FromMinutes(1), Criteria.PERCredentialStaffPage.AssignReferee2PERRefsFormFirstRefSelElemHasItemsIsVisible);
            Thread.Sleep(0200);

            AssignReferee2PERRefsFormFirstRefSelElem.SelectByText(referee1FullName);
            AssignReferee2PERRefsFormSecondRefSelElem.SelectByText(referee2FullName);

            ClickAndWait(AssignReferee2PERRefsFormSubmitBtn);
        }
Exemplo n.º 19
0
        /// <summary>
        /// Chooses a learner in the learners table, clicks on the Actions button, clicks on Add/Remove Flag, fill in
        /// all of the fields with random data and clicks Save Flag
        /// </summary>
        /// <param name="learnerFullName"></param>
        public void AddFlag(string learnerFullName)
        {
            IWebElement btn = ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, LearnersTbl, Bys.CBDProgDirectorPage.LearnersTblRowBody,
                                                                      learnerFullName, "a", "Actions", "span");

            Thread.Sleep(0500);

            IWebElement btnParent = XpathUtils.GetNthParentElem(btn, 3);

            ElemSet.Grid_ClickMenuItemInsideDropdown(Browser, btnParent, "Add/Remove Flag");
            Browser.WaitForElement(Bys.CBDProgDirectorPage.AddRemoveFlagFormReasonTxt, ElementCriteria.IsVisible);
            this.WaitUntilAll(Criteria.CBDProgDirectorPage.LoadElementClassAttributeSetToHide, Criteria.CBDProgDirectorPage.LoadElementDisappeared);

            AddRemoveFlagFormReasonTxt.SendKeys(DataUtils.GetRandomSentence(10));
            ClickAndWait(AddRemoveFlagFormSaveFlagBtn);
        }
        /// <summary>
        /// Clicks on the Assessors tab if we are not already there, clicks the Assign Third Assessor button for a user-specified trainee, chooses
        /// a user-specified assessor, then clicks the Submit button
        /// </summary>
        /// <param name="traineeFullName">The trainee's first and last nameThe exact text of the trainee from the Trainee column inside the Trainee table on the Referee tab</param>
        /// <param name="assessor3FullName">The first and last name of the assessor</param>
        public void Assign3rdAssessor(string traineeFullName, string assessor3FullName)
        {
            ClickAndWait(AssessorTab);

            ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, AssessorTbl, Bys.DiplomaCredentialStaffPage.AssessorTblFirstRow,
                                                    traineeFullName, "a", "Assign Third Assessor", "span");

            this.WaitUntil(Criteria.DiplomaCredentialStaffPage.AssignAssessor3rdAssFormSubmitBtnVisible);
            this.WaitUntil(TimeSpan.FromSeconds(60), Criteria.DiplomaCredentialStaffPage.AssignAssessor3rdAssFormThirdAssSelElemVisible);
            Thread.Sleep(0200);

            ElemSet.ScrollToSelectElement(Browser, AssignAssessor3rdAssFormThirdAssSelElem);
            AssignAssessor3rdAssFormThirdAssSelElem.SelectByText(assessor3FullName);

            ClickAndWait(AssignAssessor3rdAssFormSubmitBtn);
        }
Exemplo n.º 21
0
        /// <summary>
        /// Selects "Needs Additional Information" in the Status drop down, clicks on the user-specified milestone,
        /// enters user-specified text into the "Your Reply" text box, clicks Save, then goes back to the Dashboard
        /// </summary>
        /// <param name="milestoneName">The milestone name as it appears in the text of the HTML elementThe exact text of the milestone inside the milestone table</param>
        /// <param name="additionalInfoText">The text you want to enter for the requested or submitted additional infoThe text of your choice</param>
        public void SubmitAdditionalInfo(string milestoneName, string additionalInfoText)
        {
            StatusSelElem.SelectByText("Needs Additional Information");

            this.WaitUntilAny(Criteria.DiplomaTraineePage.MilestonesTblMilestoneNameLinksEnabled);

            ElemSet.ScrollToElement(Browser, MilestonesInMilestonesTblLnks[0]);
            ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, MilestonesTbl, Bys.DiplomaTraineePage.MilestonesTblFirstRow, milestoneName, null, milestoneName);
            WaitForMilestoneFrame();

            YourReplyTxt.SendKeys(additionalInfoText);
            this.WaitUntilAll(Criteria.DiplomaTraineePage.YourReplySaveChangesButtonVisible);

            ClickAndWait(YourReplySaveChangesBtn);

            ClickAndWait(ResubmitBtn);
        }
        /// <summary>
        /// Clicks on the Portfolios Under Review tab, clicks on the Assign Reviewer button for a user-specified trainee, assigns 2 assessors,
        /// clicks the Submit button on the confirmation popup window
        /// </summary>
        /// <param name="traineeFullName"></param>
        public void AssignReviewer(string traineeFullName, string assessor1FullName, string assessor2FullName)
        {
            ClickAndWait(PortfoliosUnderReviewTab);

            ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, PortfoliosUnderReviewTbl, Bys.DiplomaCredentialStaffPage.PortfoliosUnderReviewTblFirstRow,
                                                    traineeFullName, "a", "Assign Reviewer", "button");

            this.WaitUntil(Criteria.DiplomaCredentialStaffPage.AssignAssessor2AssFormSubmitBtnVisible);
            this.WaitUntil(TimeSpan.FromSeconds(60), Criteria.DiplomaCredentialStaffPage.AssignAssessor2AssFormFirstAssSelElemVisible);
            Thread.Sleep(1000);

            ElemSet.ScrollToSelectElement(Browser, AssignAssessor2AssFormFirstAssSelElem);
            AssignAssessor2AssFormFirstAssSelElem.SelectByText(assessor1FullName);
            AssignAssessor2AssFormSecondAssSelElem.SelectByText(assessor2FullName);

            ClickAndWait(AssignAssessor2AssFormSubmitBtn);
        }
        /// <summary>
        /// Clicks on the Portfolios Under Review tab, clicks on the Record Payment button for a user-specified trainee, fills in the date and
        /// comments fields clicks the Submit button on the confirmation popup window
        /// </summary>
        /// <param name="traineeFullName"></param>
        public void RecordPayment(string traineeFullName)
        {
            ClickAndWait(PortfoliosUnderReviewTab);

            ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, PortfoliosUnderReviewTbl, Bys.DiplomaCredentialStaffPage.PortfoliosUnderReviewTblFirstRow,
                                                    traineeFullName, null, "Record Payment");

            this.WaitUntil(Criteria.DiplomaCredentialStaffPage.RecordPaymentFormSubmitBtnVisible);

            RecordPaymentFormDateTxt.SendKeys("09/09/2017");
            RecordPaymentFormDateTxt.SendKeys(Keys.Tab);
            Thread.Sleep(0200);

            RecordPaymentFormCommentsTxt.SendKeys("these are my comments :)");

            ClickAndWait(RecordPaymentFormSubmitBtn);
        }
Exemplo n.º 24
0
        /// <summary>
        /// Opens the Set Status form for a given learner on the Agenda table if it is not already opens, then chooses a user-specified
        /// Learner Status and Actions, then clicks the Confirm Status button and waits for the window to close
        /// </summary>
        /// <param name="learnerFullName">The exact text from the cell that your learner exists within</param>
        /// <param name="learnerStatus">The exact text from one of the items in the Learner Status select element</param>
        /// <param name="actions">The exact text from one of the items in the Actions select element</param>
        public void SetStatusOfLearner(string learnerFullName, string learnerStatus, string actions)
        {
            // If the Set Status window is not open, open it
            if (!Browser.Exists(Bys.CBDProgDirectorPage.SetStatusFormLearnerStatusSelElem, ElementCriteria.IsVisible))
            {
                ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, AgendaTbl, Bys.CBDProgDirectorPage.AgendaTbl, learnerFullName, null, "Set Status");
                this.WaitUntilAll(Criteria.CBDProgDirectorPage.SetStatusFormLearnStatusSelElemHasItemsAndIsEnabled,
                                  Criteria.CBDProgDirectorPage.LoadElementClassAttributeSetToHide, Criteria.CBDProgDirectorPage.LoadElementDisappeared);
            }

            SetStatusFormLearnerStatusSelElem.SelectByText(learnerStatus);
            Thread.Sleep(0200);
            this.WaitUntilAll(Criteria.CBDProgDirectorPage.LoadElementDisappeared, Criteria.CBDProgDirectorPage.LoadElementClassAttributeSetToHide);

            SetStatusFormActionsSelElem.SelectByText(actions);

            ClickAndWait(SetStatusFormConfirmBtn);
        }
Exemplo n.º 25
0
        /// <summary>
        /// Chooses User specified Learner, clicks the Action button, selects Add Supporting Documentation,
        /// fills in the File Name text box, then clicks Submit
        /// </summary>
        /// <param name="learnerName">First and last name of the learner</param>
        /// <param name="fileLocation">File location</param>
        public void AddSupportDocumentation(string learnerFullName, string fileLocation)
        {
            IWebElement btn = ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, LearnersTbl,
                                                                      Bys.CBDProgDirectorPage.LearnersTblRowBody, learnerFullName, "a", "Actions", "span");

            Thread.Sleep(0500);

            IWebElement btnParent = XpathUtils.GetNthParentElem(btn, 3);

            ElemSet.Grid_ClickMenuItemInsideDropdown(Browser, btnParent, "Add Supporting Documentation");
            Browser.WaitForElement(Bys.CBDProgDirectorPage.AddSupportingDocumentationFormFilelocationTxt, ElementCriteria.IsVisible);
            this.WaitUntilAll(Criteria.CBDProgDirectorPage.LoadElementClassAttributeSetToHide, Criteria.CBDProgDirectorPage.LoadElementDisappeared);

            AddSupportingDocumentationFormFilelocationTxt.SendKeys(fileLocation);

            // FileUtils.Upload(AddSupportingDocumentationFormBrowseBtn, @"C:\SeleniumAutoIt\FileUpload.exe", browserName, "C:\\SeleniumAutoIt\\test.txt");

            ClickAndWait(AddSupportingDocumentationFormSubmitBtn);
        }
Exemplo n.º 26
0
        /// <summary>
        /// Chooses User specified Learner, clicks the Action button, selects Add Notes, fills in the Subject and Notes text box with
        /// a random string, chooses the user-specified radio button  then clicks Submit
        /// </summary>
        /// <param name="learnerFullName">First and last name of the learner</param>
        /// <param name="sharingOption">The exact text of either radio button on the Add Notes form</param>
        public void AddNotes(string learnerFullName, string sharingOption)
        {
            IWebElement btn = ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, LearnersTbl, Bys.CBDProgDirectorPage.LearnersTblRowBody,
                                                                      learnerFullName, "a", "Actions", "span");

            Thread.Sleep(0500);

            IWebElement btnParent = XpathUtils.GetNthParentElem(btn, 3);

            ElemSet.Grid_ClickMenuItemInsideDropdown(Browser, btnParent, "Add Notes");
            Browser.WaitForElement(Bys.CBDProgDirectorPage.AddNotesFormSubjectTxt, ElementCriteria.IsVisible);
            this.WaitUntilAll(Criteria.CBDProgDirectorPage.LoadElementClassAttributeSetToHide, Criteria.CBDProgDirectorPage.LoadElementDisappeared);

            AddNotesFormNotesTxt.SendKeys(DataUtils.GetRandomSentence(12));
            ElemSet.RdoBtn_ClickRandom(Browser, "Share This Note");
            AddNotesFormSubjectTxt.SendKeys(DataUtils.GetRandomSentence(12));

            ClickAndWait(AddNotesFormSubmitBtn);
        }
        /// <summary>
        /// Clicks on the Portfolios Under Review tab, clicks on the Record Payment button for a user-specified trainee, fills in the date and
        /// comments fields clicks the Submit button on the confirmation popup window
        /// </summary>
        /// <param name="traineeFullName"></param>
        public void RecordPayment(string traineeFullName)
        {
            ClickAndWait(PortfoliosUnderReviewTab);

            ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, PortfoliosUnderReviewTbl, Bys.DiplomaCredentialStaffPage.PortfoliosUnderReviewTblFirstRow,
                                                    traineeFullName, "a", "Record Payment", "button");

            this.WaitUntil(Criteria.DiplomaCredentialStaffPage.RecordPaymentFormSubmitBtnVisible);
            // Adding a sleep here because test failed on 1/10/18. When I looked at screenshot, it failed to enter text into the date box. Maybe
            // it needs to wait a little after this button appears. Monitor going forward
            Thread.Sleep(0300);
            RecordPaymentFormDateTxt.SendKeys("09/09/2017");
            RecordPaymentFormDateTxt.SendKeys(Keys.Tab);
            Thread.Sleep(0200);

            RecordPaymentFormCommentsTxt.SendKeys("these are my comments :)");

            ClickAndWait(RecordPaymentFormSubmitBtn);
        }
Exemplo n.º 28
0
        /// <summary>
        /// Chooses a program from the Program dropdown, clicks on the Learner tab, chooses a user specified Learner,
        /// clicks on the Actions button, clicks on Add/Remove Flag, fill in
        /// all of the fields with random data and clicks Save Flag
        /// </summary>
        /// <param name="program">The text from one of the items in the Program dropdown</param>
        /// <param name="learnerFullName">First and last name of the learner</param>
        public void AddFlag(string program, string learnerFullName)
        {
            SelectProgram(program);

            ClickAndWait(LearnersTab);

            IWebElement btn = ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, LearnersTbl,
                                                                      Bys.CBDProgDeanPage.LearnersTblBodyRow, learnerFullName, "a", "Actions", "span");

            Thread.Sleep(0500);

            IWebElement btnParent = XpathUtils.GetNthParentElem(btn, 3);

            ElemSet.Grid_ClickMenuItemInsideDropdown(Browser, btnParent, "Add/Remove Flag");
            Browser.WaitForElement(Bys.CBDProgDeanPage.AddRemoveFlagFormReasonTxt, ElementCriteria.IsVisible);
            this.WaitUntil(Criteria.CBDProgDeanPage.LoadElementDoneLoading);

            AddRemoveFlagFormReasonTxt.SendKeys(DataUtils.GetRandomSentence(10));
            ClickAndWait(AddRemoveFlagFormSaveFlagBtn);
        }
Exemplo n.º 29
0
        /// <summary>
        /// Clicks on the Assessors tab if we are not already there, clicks the Make Final Review button for a user-specified trainee,
        /// Clicks on either the Achieved or Not Achieved radio button, enters text into Request Comments field, then clicks the Submit button
        /// </summary>
        /// <param name="traineeFullName">The trainee's first and last nameThe exact text of the trainee from the Trainee column inside the Trainee table on the Assessor tab</param>
        /// <param name="achieved">true or false depending on if you want to achieve the trainee or not</param>
        public void MakeFinalReview(string traineeFullName, bool achieved)
        {
            ClickAndWait(AssessorTab);

            ElemSet.Grid_ClickButtonOrLinkWithinRow(Browser, AssessorTabTraineeTbl, Bys.PERCredentialStaffPage.AssessorTabTraineeTblFirstRow,
                                                    traineeFullName, "a", "Make Final Review", "button");

            this.WaitUntil(TimeSpan.FromSeconds(10), Criteria.PERCredentialStaffPage.FinalReviewFormAchievedRdoVisible);

            if (achieved)
            {
                FinalReviewFormAchievedRdo.Click();
            }
            else
            {
                FinalReviewFormNotAchievedRdo.Click();
            }

            FinalReviewFormRequestCommentsTxt.SendKeys(DataUtils.GetRandomSentence(12));

            ClickAndWait(FinalReviewFormSubmitBtn);
        }
Exemplo n.º 30
0
 /// <summary>
 /// Clicks on any website within the sites table, then waits for the next page to load
 /// </summary>
 /// <param name="browser">The driver instance</param>
 /// <param name="siteName">The exact text of the link for the site that you want to click on</param>
 internal void ClickSiteAndWait(IWebDriver browser, string siteName)
 {
     ElemSet.Grid_ClickButtonOrLinkWithinRow(browser, SitesTbl, Bys.SearchPage.SitesTblBodyRow,
                                             siteName + "...", "a", siteName + "...", "a");
     browser.WaitForElement(Bys.Page.AllParticipantsLnk, ElementCriteria.IsVisible);
 }