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