Пример #1
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);
        }
Пример #2
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);
        }
Пример #3
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);
        }