Ejemplo n.º 1
0
 /// <summary>
 /// Selects a program in the program dropdown, then waits until the page loads
 /// </summary>
 /// <param name="programToSelect">Exact text from the Option element insdie the Program Select Element</param>
 public void SelectProgram(string programToSelect)
 {
     ProgramSelElem.SelectByText(programToSelect);
     this.WaitUntil(TimeSpan.FromSeconds(5), Criteria.CBDProgDeanPage.LearnersTabTextNotEqualToZero);
     this.WaitUntil(Criteria.CBDProgDeanPage.LoadElementDoneLoading);
     // Sometimes the load icon shows twice (disappears then reappears after selecting an item in the Program dropdown.
     // Due to this, we have to add a sleep. I couldnt think of a way to dynamically wait
     Thread.Sleep(0500);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Explain
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        public string ReturnValueAfterSelectingProgram(int index)
        {
            string ProgramName = "";

            ProgramSelElem.SelectByIndex(index);
            WaitForInitialize();
            ProgramName = ProgramSelElem.SelectedOption.Text;
            return(ProgramName);
        }