示例#1
0
        /// <summary>
        /// Clicks on the Assessors tab if we are not already there, clicks the Assign Assessors button for a user-specified trainee, chooses
        /// a user-specified first and second 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="assessor1FullName">The first and last name of the assessor</param>
        /// <param name="assessor2FullName">The first and last name of the assessor</param>
        public void AssignFirst2Assessors(string traineeFullName, string Assessor1FullName, string Assessor2FullName)
        {
            ClickAndWait(AssessorTab);

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

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

            AssignAssessor2AssFormFirstAssSelElem.SelectByText(Assessor1FullName);
            AssignAssessor2AssFormSecondAssSelElem.SelectByText(Assessor2FullName);

            ClickAndWait(AssignAssessor2AssFormSubmitBtn);
        }
        /// <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);
        }