public PupilPickerDialog ClickAddPupil()
        {
            _addPupilButton.ClickByJS();
            Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask"));

            return(new PupilPickerDialog());
        }
示例#2
0
 public void Cancel()
 {
     if (_cancelButton.IsExist())
     {
         _cancelButton.ClickByJS();
         Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask"));
     }
 }
示例#3
0
 public void ClickDelete()
 {
     base.Refresh();
     if (_deleteButton.IsExist())
     {
         _deleteButton.ClickByJS();
         Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask"));
     }
 }
示例#4
0
 public MedicalPracticePage Cancel()
 {
     if (_cancelButton.IsExist())
     {
         _cancelButton.ClickByJS();
         Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask"));
     }
     return(new MedicalPracticePage());
 }
示例#5
0
        public void ClickSave()
        {
            SeleniumHelper.Sleep(5);
            Wait.WaitForControl(SimsBy.AutomationId("well_know_action_save"));
            IWebElement save = SeleniumHelper.Get(SimsBy.AutomationId("well_know_action_save"));

            save.ClickByJS();
            Wait.WaitForAjaxReady(By.CssSelector(".locking-mask"));
            Refresh();
        }
示例#6
0
 public SuspensionRecordPage ClickDeleteRow(SuspensionExpulsion row)
 {
     if (row != null)
     {
         row.DeleteRow();
         _saveButton.Click();
         Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask"));
     }
     return(new SuspensionRecordPage());
 }
示例#7
0
 public ConfirmRequiredDialog ClickSave(bool waitForConfirmDialog = true)
 {
     _saveButton.ClickByJS();
     Wait.WaitForAjaxReady(By.CssSelector(".locking-mask"));
     if (waitForConfirmDialog)
     {
         Wait.WaitForElement(SimsBy.CssSelector("[data-section-id='generic-confirm-dialog']"));
         return(new ConfirmRequiredDialog());
     }
     return(null);
 }
示例#8
0
 public void DeleteRow()
 {
     if (_removeButton.IsExist())
     {
         _removeButton.ClickByJS();
         var _okButton = SeleniumHelper.Get(SimsBy.AutomationId("Yes_button"));
         if (_okButton.IsExist())
         {
             _okButton.Click();
         }
     }
 }
示例#9
0
 public bool IsDateOfAdmissionWarningMessageDisplayed()
 {
     try
     {
         AutomationSugar.WaitForAjaxCompletion();
         return(SeleniumHelper.IsElementExists(SimsBy.AutomationId("status_error")));
     }
     catch (Exception)
     {
         return(false);
     }
 }
示例#10
0
 /// <summary>
 /// Au : Hieu Pham
 /// Check Pupil Leaving detail display for pupil name.
 /// </summary>
 /// <param name="pupilName"></param>
 /// <returns></returns>
 public bool IsPupilLeavingDetailForPupilName(string pupilName)
 {
     try
     {
         IWebElement titleElement = SeleniumHelper.FindElement(SimsBy.AutomationId("pupil_leaving_details_header_display_name"));
         return(titleElement.GetText().Equals(pupilName));
     }
     catch (NoSuchElementException)
     {
         return(false);
     }
 }
示例#11
0
        public List <Note> GetNotes()
        {
            List <Note> lstNote = new List <Note>();
            var         _notes  = _timeLineElement.FindElements(SimsBy.CssSelector(".event"));

            foreach (var noteElement in _notes)
            {
                var note = new Note(noteElement);
                lstNote.Add(note);
            }
            return(lstNote);
        }
示例#12
0
        public QuickAddBehaviourDialog OpenBehaviourPopup()
        {
            By behaviourLinkSelector = SimsBy.Xpath("//*/a[@data-class-log-conduct-event='behaviourlink']");

            ElementRetriever.FindElementSafe(WebContext.WebDriver, behaviourLinkSelector).Click();
            AutomationSugar.WaitForAjaxCompletion();

            // Arbitrary but assume that if the title is displayed then the dialog has loaded?
            Wait.WaitForElementDisplayed(SimsBy.AutomationId("record_behaviour_popup_header_title"));

            return(new QuickAddBehaviourDialog());
        }
示例#13
0
 public void DeleteRow()
 {
     if (SeleniumHelper.IsExist(_deleteButton))
     {
         _deleteButton.ScrollToByAction();
         _deleteButton.ClickByJS();
         var _okButton = SeleniumHelper.Get(SimsBy.AutomationId("Yes_button"));
         if (SeleniumHelper.IsExist(_okButton))
         {
             _okButton.Click();
         }
     }
 }
示例#14
0
        public bool IsOverlapMessageDisplayed()
        {
            IList <IWebElement> elements = SeleniumHelper.FindElements(SimsBy.CssSelector(".validation-summary-errors li"));

            foreach (var element in elements)
            {
                if (element.GetText().Trim().Contains("Dates Overlap"))
                {
                    return(true);
                }
            }
            return(false);
        }
示例#15
0
        public SuspensionRecordPage ClickDeleteAllRow(List <SuspensionExpulsion> rows)
        {
            if (rows.Count > 0)
            {
                foreach (SuspensionExpulsion row in rows)
                {
                    row.DeleteRow();
                }
                _saveButton.Click();
                Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask"));
            }

            return(new SuspensionRecordPage());
        }
示例#16
0
        public Note GetNote(string noteName)
        {
            var _notes = _timeLineElement.FindElements(SimsBy.CssSelector(".event"));

            foreach (var note in _notes)
            {
                var name = note.FindElement(SimsBy.AutomationId("log-event-heading")).GetText();
                if (name.Trim().Contains(noteName))
                {
                    return(new Note(note));
                }
            }

            return(null);
        }
示例#17
0
        public SuspensionRecordPage ConfirmDelete(SuspensionExpulsion row, bool isDelete = false)
        {
            IWebElement _cancelButton = SeleniumHelper.Get(SimsBy.AutomationId("No_button"));
            IWebElement _yesButton    = SeleniumHelper.Get(SimsBy.AutomationId("Yes_button"));

            if (isDelete)
            {
                _yesButton.Click();
            }
            else
            {
                _cancelButton.Click();
            }
            return(new SuspensionRecordPage());
        }
示例#18
0
        private void Initialise()
        {
            const string resultTileIdentifier = "search_result";

            var results = this.Component.FindElements(SimsBy.AutomationId(resultTileIdentifier));

            foreach (var result in results)
            {
                var resultComponent = new TResultTile {
                    Tile = result
                };

                PageFactory.InitElements(resultComponent, new ElementLocator(result));
                _results.Add(resultComponent);
            }
        }
示例#19
0
        public SearchListResultsComponent <TResultTile> Search()
        {
            WebDriverWait wait = new WebDriverWait(WebContext.WebDriver, TimeSpan.FromSeconds(10));
            Stopwatch     sw   = new Stopwatch();

            sw.Start();
            AutomationSugar.ClickOn(new ByChained(this._parent.ComponentIdentifier, SimsBy.AutomationId("search_criteria_submit")));
            _logger.LogLine("Waiting and clicking on search button took {0}ms.", sw.ElapsedMilliseconds);
            wait.Until(ExpectedConditions.ElementIsVisible(new ByChained(this._parent.ComponentIdentifier, SimsBy.AutomationId("resultTile"))));
            _logger.LogLine("Waiting search results took {0}ms.", sw.ElapsedMilliseconds);
            SearchListResultsComponent <TResultTile> results = new SearchListResultsComponent <TResultTile>(_parent);

            _logger.LogLine("Binding seach results tool {0}ms.", sw.ElapsedMilliseconds);
            sw.Stop();
            return(results);
        }
示例#20
0
 public bool IsYesNoDeleteButtonDisplayed()
 {
     return(SeleniumHelper.FindElement(SimsBy.AutomationId("Yes_button")).IsExist() && SeleniumHelper.FindElement(SimsBy.AutomationId("No_button")).IsExist());
 }
示例#21
0
 public bool IsSuccessMessageDisplay()
 {
     AutomationSugar.WaitForAjaxCompletion();
     return(SeleniumHelper.IsElementExists(SimsBy.AutomationId("status_success")));
 }
示例#22
0
 public string GetSliderState()
 {
     Wait.WaitUntilDisplayed(SimsBy.CssSelector("[data-subslider-control]"));
     return(WebContext.WebDriver.FindElement(By.CssSelector("input[name='SliderState']")).GetValue());
 }
示例#23
0
 public void SelectAssociatedPupilsTab()
 {
     _associatedPupilsLink.ClickByJS();
     Wait.WaitForElementDisplayed(SimsBy.CssSelector("[data-maintenance-container='LearnerContactRelationships']"));
 }
示例#24
0
 public SuspensionRecordPage SaveValues()
 {
     _saveButton.Click();
     Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask"));
     return(new SuspensionRecordPage());
 }
示例#25
0
 public AddAssociatedPupilsTripletDialog ClickAddPupilLink()
 {
     _addPupilLink.ClickByJS();
     Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask"));
     return(new AddAssociatedPupilsTripletDialog());
 }
示例#26
0
 public void ClickAdd()
 {
     _addButton.ClickByJS();
     Wait.WaitUntilDisplayed(SimsBy.AutomationId("well_know_action_save"));
     Refresh();
 }
示例#27
0
 public static BehaviourEventRecordPage Create()
 {
     Wait.WaitUntilDisplayed(SimsBy.AutomationId("add_button"));
     return(new BehaviourEventRecordPage());
 }
示例#28
0
 public void ClickFollowUpTab()
 {
     _followUpTab.ClickByJS();
     Wait.WaitUntilDisplayed(SimsBy.AutomationId("pupil_Involved_Selection_Strip"));
     Refresh();
 }
示例#29
0
 /// <summary>
 /// Creates this instance.
 /// </summary>
 /// <returns></returns>
 public static ExclusionRecordPage Create()
 {
     Wait.WaitUntilDisplayed(SimsBy.AutomationId("well_know_action_save"));
     return(new ExclusionRecordPage());
 }
示例#30
0
 public void ClickSave()
 {
     _saveButton.Click();
     Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask"));
 }