public PupilPickerDialog ClickAddPupil() { _addPupilButton.ClickByJS(); Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask")); return(new PupilPickerDialog()); }
public void Cancel() { if (_cancelButton.IsExist()) { _cancelButton.ClickByJS(); Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask")); } }
public void ClickDelete() { base.Refresh(); if (_deleteButton.IsExist()) { _deleteButton.ClickByJS(); Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask")); } }
public MedicalPracticePage Cancel() { if (_cancelButton.IsExist()) { _cancelButton.ClickByJS(); Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask")); } return(new MedicalPracticePage()); }
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(); }
public SuspensionRecordPage ClickDeleteRow(SuspensionExpulsion row) { if (row != null) { row.DeleteRow(); _saveButton.Click(); Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask")); } return(new SuspensionRecordPage()); }
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); }
public void DeleteRow() { if (_removeButton.IsExist()) { _removeButton.ClickByJS(); var _okButton = SeleniumHelper.Get(SimsBy.AutomationId("Yes_button")); if (_okButton.IsExist()) { _okButton.Click(); } } }
public bool IsDateOfAdmissionWarningMessageDisplayed() { try { AutomationSugar.WaitForAjaxCompletion(); return(SeleniumHelper.IsElementExists(SimsBy.AutomationId("status_error"))); } catch (Exception) { return(false); } }
/// <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); } }
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); }
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()); }
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(); } } }
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); }
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()); }
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); }
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()); }
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); } }
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); }
public bool IsYesNoDeleteButtonDisplayed() { return(SeleniumHelper.FindElement(SimsBy.AutomationId("Yes_button")).IsExist() && SeleniumHelper.FindElement(SimsBy.AutomationId("No_button")).IsExist()); }
public bool IsSuccessMessageDisplay() { AutomationSugar.WaitForAjaxCompletion(); return(SeleniumHelper.IsElementExists(SimsBy.AutomationId("status_success"))); }
public string GetSliderState() { Wait.WaitUntilDisplayed(SimsBy.CssSelector("[data-subslider-control]")); return(WebContext.WebDriver.FindElement(By.CssSelector("input[name='SliderState']")).GetValue()); }
public void SelectAssociatedPupilsTab() { _associatedPupilsLink.ClickByJS(); Wait.WaitForElementDisplayed(SimsBy.CssSelector("[data-maintenance-container='LearnerContactRelationships']")); }
public SuspensionRecordPage SaveValues() { _saveButton.Click(); Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask")); return(new SuspensionRecordPage()); }
public AddAssociatedPupilsTripletDialog ClickAddPupilLink() { _addPupilLink.ClickByJS(); Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask")); return(new AddAssociatedPupilsTripletDialog()); }
public void ClickAdd() { _addButton.ClickByJS(); Wait.WaitUntilDisplayed(SimsBy.AutomationId("well_know_action_save")); Refresh(); }
public static BehaviourEventRecordPage Create() { Wait.WaitUntilDisplayed(SimsBy.AutomationId("add_button")); return(new BehaviourEventRecordPage()); }
public void ClickFollowUpTab() { _followUpTab.ClickByJS(); Wait.WaitUntilDisplayed(SimsBy.AutomationId("pupil_Involved_Selection_Strip")); Refresh(); }
/// <summary> /// Creates this instance. /// </summary> /// <returns></returns> public static ExclusionRecordPage Create() { Wait.WaitUntilDisplayed(SimsBy.AutomationId("well_know_action_save")); return(new ExclusionRecordPage()); }
public void ClickSave() { _saveButton.Click(); Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask")); }