예제 #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)
        {
            ElemSet.Grid_ClickMenuItemInsideButton(Browser, LearnersTbl, Bys.CBDProgDirectorPage.LearnersTblRowBody, learnerFullName, null, "Actions", "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);
        }
 public void OpenCompleteAssessFormmentWindow(string learnerName, string formName)
 {
     ElemSet.Grid_ClickMenuItemInsideButton(Browser, AcceptedTbl, Bys.CBDObserverPage.AcceptedTblRowBody, learnerName, formName, "Actions", "Complete Assessment");
     Browser.WaitForElement(Bys.CBDObserverPage.CompleteAssessFormFeedbackTxt, ElementCriteria.IsEnabled, ElementCriteria.IsVisible);
     Browser.WaitForElement(Bys.CBDObserverPage.CompleteAssessFormDateControlExpandBtn, ElementCriteria.IsVisible, ElementCriteria.IsEnabled);
     this.WaitForInitialize();
 }
예제 #3
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)
        {
            ElemSet.Grid_ClickMenuItemInsideButton(Browser, LearnersTbl, Bys.CBDProgDirectorPage.LearnersTblRowBody, learnerFullName, null, "Actions", "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);
        }
예제 #4
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)
        {
            ElemSet.Grid_ClickMenuItemInsideButton(Browser, LearnersTbl, Bys.CBDProgDirectorPage.LearnersTblRowBody, learnerFullName, null, "Actions", "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);
        }
예제 #5
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 Remove Flag if a flag is present
        /// </summary>
        /// <param name="learnerFullName"></param>
        public void RemoveFlag(string learnerFullName)
        {
            ElemSet.Grid_ClickMenuItemInsideButton(Browser, LearnersTbl, Bys.CBDProgDirectorPage.LearnersTblRowBody, learnerFullName, null, "Actions", "Add/Remove Flag");
            Browser.WaitForElement(Bys.CBDProgDirectorPage.AddRemoveFlagFormReasonTxt, ElementCriteria.IsVisible);
            this.WaitUntilAll(Criteria.CBDProgDirectorPage.LoadElementClassAttributeSetToHide, Criteria.CBDProgDirectorPage.LoadElementDisappeared);

            // If the flag is there, remove it
            if (AddRemoveFlagFormRemoveFlagBtn.Enabled)
            {
                ClickAndWait(AddRemoveFlagFormRemoveFlagBtn);
            }
        }
예제 #6
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)
        {
            ElemSet.Grid_ClickMenuItemInsideButton(Browser, LearnersTbl, Bys.CBDProgDirectorPage.LearnersTblRowBody, learnerFullName, null, "Actions", "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);
        }
예제 #7
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);

            ElemSet.Grid_ClickMenuItemInsideButton(Browser, LearnersTbl, Bys.CBDProgDeanPage.LearnersTblBodyRow, learnerFullName, null, "Actions", "Add/Remove Flag");
            Browser.WaitForElement(Bys.CBDProgDeanPage.AddRemoveFlagFormReasonTxt, ElementCriteria.IsVisible);
            this.WaitUntil(Criteria.CBDProgDeanPage.LoadElementDoneLoading);

            AddRemoveFlagFormReasonTxt.SendKeys(DataUtils.GetRandomSentence(10));
            ClickAndWait(AddRemoveFlagFormSaveFlagBtn);
        }
예제 #8
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 Remove Flag if a flag is present
        /// </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 RemoveFlag(string program, string learnerFullName)
        {
            SelectProgram(program);

            ClickAndWait(LearnersTab);

            ElemSet.Grid_ClickMenuItemInsideButton(Browser, LearnersTbl, Bys.CBDProgDeanPage.LearnersTblBodyRow, learnerFullName, null, "Actions", "Add/Remove Flag");
            Browser.WaitForElement(Bys.CBDProgDeanPage.AddRemoveFlagFormReasonTxt, ElementCriteria.IsVisible);
            this.WaitUntil(Criteria.CBDProgDeanPage.LoadElementDoneLoading);

            // If the flag is there, remove it
            if (AddRemoveFlagFormRemoveFlagBtn.Enabled)
            {
                ClickAndWait(AddRemoveFlagFormRemoveFlagBtn);
            }
        }
예제 #9
0
        /// <summary>
        /// Chooses a program from the Program dropdown, clicks on the Learner tab, chooses a 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="program">The text from one of the items in the Program dropdown</param>
        /// <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 program, string learnerFullName)
        {
            SelectProgram(program);

            ClickAndWait(LearnersTab);

            ElemSet.Grid_ClickMenuItemInsideButton(Browser, LearnersTbl, Bys.CBDProgDeanPage.LearnersTblBodyRow, learnerFullName, null, "Actions", "Add Notes");
            Browser.WaitForElement(Bys.CBDProgDeanPage.AddNotesFormSubjectTxt, ElementCriteria.IsVisible);
            this.WaitUntil(Criteria.CBDProgDeanPage.LoadElementDoneLoading);

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

            ClickAndWait(AddNotesFormSubmitBtn);
        }
예제 #10
0
        /// <summary>
        /// Chooses a program from the Program dropdown, clicks on the Learner tab, chooses a user specified Learner,
        /// clicks the Action button, selects Add Supporting Documentation, fills in the File Name text box,
        /// then clicks Submit
        /// </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>
        /// <param name="fileLocation">File location</param>
        public void AddSupportDocumentation(string program, string learnerFullName, string fileLocation)
        {
            SelectProgram(program);

            ClickAndWait(LearnersTab);

            ElemSet.Grid_ClickMenuItemInsideButton(Browser, LearnersTbl, Bys.CBDProgDeanPage.LearnersTblBodyRow, learnerFullName, null, "Actions", "Add Supporting Documentation");
            Browser.WaitForElement(Bys.CBDProgDeanPage.AddSupportingDocumentationFormFilelocationTxt, ElementCriteria.IsVisible);
            this.WaitUntil(Criteria.CBDProgDeanPage.LoadElementDoneLoading);

            AddSupportingDocumentationFormFilelocationTxt.SendKeys(fileLocation);

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

            ClickAndWait(AddSupportingDocumentationFormSubmitBtn);
        }
        /// <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)
        {
            ElemSet.Grid_ClickMenuItemInsideButton(Browser, PendingAcceptanceTbl, Bys.CBDObserverPage.PendingAcceptanceTblRowBody, learnerName, formName, "Actions", "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);
        }
 /// <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)
 {
     ElemSet.Grid_ClickMenuItemInsideButton(Browser, ExpiredDeclinedTbl, Bys.CBDObserverPage.ExpiredDeclinedTblRowBody, learnerName, formName, "Actions", "Remove");
     ClickAndWait(ConfirmFormRemoveAssessOkBtn);
 }