Beispiel #1
0
 /// <summary>
 /// Select a Group on Gradeset Pannel
 /// </summary>
 public POSSearchPannel SelectGroup(string GroupName)
 {
     SeleniumHelper.ChooseSelectorOption(GroupSelector, GroupName);
     WaitUntillAjaxRequestCompleted();
     Thread.Sleep(6000);
     return(new POSSearchPannel());
 }
        /// <summary>
        ///  Sets the value in the grade row.
        /// </summary>
        /// <param name="index"></param>
        /// <param name="fieldPrefix"></param>
        /// <param name="code"></param>
        /// <param name="description"></param>
        /// <param name="value"></param>
        /// <param name="colourStyle"></param>
        /// <param name="parentCode"></param>
        public void SetGradeRow(int index, string fieldPrefix, string code, string description, string value, bool colourStyle = false, string parentCode = null)
        {
            string      prefix             = fieldPrefix + ".AssessmentGrades";
            IWebElement defaultGradeRow    = WebContext.WebDriver.FindElements(By.CssSelector("tr[data-row-name='" + prefix + "']"))[index];
            string      gradeRowPrefix     = defaultGradeRow.GetAttribute("data-fieldprefix");
            string      gradeCode          = gradeRowPrefix + ".Code";
            string      gradeDesc          = gradeRowPrefix + ".Description";
            string      gradeValue         = gradeRowPrefix + ".Value";
            IWebElement gradesetCodeInput  = WebContext.WebDriver.FindElement(By.Name(gradeCode));
            IWebElement gradesetDescInput  = WebContext.WebDriver.FindElement(By.Name(gradeDesc));
            IWebElement gradesetValueInput = WebContext.WebDriver.FindElement(By.Name(gradeValue));

            gradesetCodeInput.Clear();
            gradesetCodeInput.SendKeys(code);
            gradesetDescInput.Clear();
            gradesetDescInput.SendKeys(description);
            gradesetValueInput.Clear();
            gradesetValueInput.SendKeys(value);
            // find the colour palette and set the colour style.
            if (colourStyle)
            {
                this.AssignColour();
            }
            if (!String.IsNullOrEmpty(parentCode))
            {
                string      gradeParent    = gradeRowPrefix + ".Parent.dropdownImitator";
                IWebElement parentSelector = WebContext.WebDriver.FindElement(By.Name(gradeParent));
                SeleniumHelper.ChooseSelectorOption(parentSelector, parentCode);
            }
        }
Beispiel #3
0
 public void SetEmailType(String EmailType)
 {
     SeleniumHelper.ChooseSelectorOption(EmailLocationType, EmailType);
     WaitUntillAjaxRequestCompleted();
 }
Beispiel #4
0
 public void SetEnquirerOccupation(String Occupation)
 {
     SeleniumHelper.ChooseSelectorOption(EnquirerOccupation, Occupation);
     WaitUntillAjaxRequestCompleted();
 }
Beispiel #5
0
 public void SetEnquirerTitle(String Title)
 {
     SeleniumHelper.ChooseSelectorOption(EnquirerTitle, Title);
     WaitUntillAjaxRequestCompleted();
 }
Beispiel #6
0
 /// <summary>
 /// Select a Subject on Gradeset Pannel
 /// </summary>
 public void SelectSubject(string SubjectName)
 {
     SeleniumHelper.ChooseSelectorOption(SubjectSelector, SubjectName);
 }
Beispiel #7
0
 /// <summary>
 /// Select a Group on Gradeset Pannel
 /// </summary>
 public void SelectGroup(string GroupName)
 {
     SeleniumHelper.ChooseSelectorOption(GroupSelector, GroupName);
 }
Beispiel #8
0
 /// <summary>
 /// Select a Strand on Gradeset Pannel
 /// </summary>
 public void SelectStrand(string StrandName)
 {
     SeleniumHelper.ChooseSelectorOption(StrandSelector, StrandName);
 }
Beispiel #9
0
 public POSSearchPannel OpenClassDropdown(string Class)
 {
     SeleniumHelper.ChooseSelectorOption(OpenClassSelector, Class);
     return(new POSSearchPannel());
 }
Beispiel #10
0
 public POSSearchPannel OpenYearGroupSelectionDropdown(string YearGroup)
 {
     SeleniumHelper.ChooseSelectorOption(OpenYearGroupSelector, YearGroup);
     return(new POSSearchPannel());
 }
Beispiel #11
0
 /// <summary>
 /// Select a Assessment Period on Gradeset Pannel
 /// </summary>
 public POSSearchPannel SelectAssessmentPeriod(string APName)
 {
     SeleniumHelper.ChooseSelectorOption(AssessmentPeriodSelector, APName);
     WaitUntillAjaxRequestCompleted();
     return(new POSSearchPannel());
 }
Beispiel #12
0
 /// <summary>
 /// Select a Strand on Gradeset Pannel
 /// </summary>
 public POSSearchPannel SelectStrand(string StrandName)
 {
     SeleniumHelper.ChooseSelectorOption(StrandSelector, StrandName);
     WaitUntillAjaxRequestCompleted();
     return(new POSSearchPannel());
 }
Beispiel #13
0
 /// <summary>
 /// Select phase
 /// </summary>
 /// <param name="Phase Name"></param>
 /// <returns></returns>
 public bool SelectPhase(string Pahse)
 {
     waiter.Until(ExpectedConditions.ElementToBeClickable(PhaseSelector));
     SeleniumHelper.ChooseSelectorOption(PhaseSelector, Pahse);
     return(true);
 }
Beispiel #14
0
 /// <summary>
 /// Select a Topic
 ///  </summary>
 public POSSearchPannel SelectTopic(string topicName)
 {
     waiter.Until(ExpectedConditions.ElementToBeClickable(TopicSelector));
     SeleniumHelper.ChooseSelectorOption(TopicSelector, topicName);
     return(new POSSearchPannel());
 }
Beispiel #15
0
 /// <summary>
 /// Select a Scheme
 ///  </summary>
 public POSSearchPannel SelectScheme(string schemeName)
 {
     SeleniumHelper.ChooseSelectorOption(SchemeSelector, schemeName);
     return(new POSSearchPannel());
 }
Beispiel #16
0
 /// <summary>
 /// Select a view (Topic/scheme)
 ///  </summary>
 public POSSearchPannel SelectView(string view)
 {
     waiter.Until(ExpectedConditions.ElementToBeClickable(ViewSelector));
     SeleniumHelper.ChooseSelectorOption(ViewSelector, view);
     return(new POSSearchPannel());
 }