/// <summary> /// Author: Ba.Truong /// Description: Click "Delete" button on the record of category need to be deleted /// </summary> /// <param name="record">The row in 'additional payment category' table need to be deleted</param> public void Delete(POM.Components.Staff.AdditionalPaymentCategoryDetailsPage.AdditionalPaymentCategoriesRow record) { if (record != null) { record.ClickDelete(); SeleniumHelper.Get(SimsBy.AutomationId("Yes_button")).ClickByJS(); SeleniumHelper.Get(SimsBy.AutomationId("well_know_action_save")).ClickByJS(); Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask")); } }
/// <summary> /// Open sign off section /// </summary> public void OpenSection() { By loc = SimsBy.AutomationId("section_menu_Sign Off"); Wait.WaitUntilDisplayed(loc); Assert.IsNotNull(SignOffSectionDetail); if (SignOffSectionDetail.IsElementDisplayed()) { SignOffSectionDetail.Click(); } }
public static void ContinueDelete() { try { IWebElement continueButton = SeleniumHelper.FindElement(SimsBy.AutomationId("continue_with_delete_button")); continueButton.Click(); Wait.WaitForAjaxReady(By.CssSelector(".locking-mask")); } catch (Exception e) {} }
/// <summary> /// Au : Hieu Pham /// Check SEN record display for pupil name. /// </summary> /// <param name="pupilName"></param> /// <returns></returns> public bool IsSenRecordForPupilName(string pupilName) { try { IWebElement titleElement = SeleniumHelper.FindElement(SimsBy.AutomationId("sen_record_header_display_name")); return(titleElement.GetText().Equals(pupilName)); } catch (NoSuchElementException) { return(false); } }
public void ContiueCreateApplicant() { try { IWebElement _buttonContinue = SeleniumHelper.FindElement(SimsBy.AutomationId("no,_this_application_is_for_a_new_pupil_button")); _buttonContinue.Click(); Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask")); } catch (Exception) { } }
/// <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 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 static bool IsServiceTypeExistedNew(String ServiceTypeId) { bool isExisted = true; try { isExisted = SeleniumHelper.IsElementExists(SimsBy.AutomationId(ServiceTypeId)); } catch (Exception) { isExisted = false; } return(isExisted); }
public void DeleteRow() { var removeElement = rowElement.FindElement(SimsBy.AutomationId("remove_button")); if (SeleniumHelper.IsExist(removeElement)) { removeElement.ClickByJS(); var _okButton = SeleniumHelper.Get(SimsBy.AutomationId("Yes_button")); if (SeleniumHelper.IsExist(_okButton)) { _okButton.Click(); SeleniumHelper.Sleep(3); } } }
public T ClickOK <T>() where T : BaseComponent, new() { Retry.Do(SeleniumHelper.Get(SimsBy.AutomationId("ok_button")).ClickByJS); Wait.WaitForAjaxReady(By.CssSelector(".locking-mask")); Wait.WaitLoading(); var page = default(T); Retry.Do(() => { page = new T(); }); page.Refresh(); return(page); }
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().Equals(noteName)) { return(new Note(note)); } } return(null); }
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); } }
/// <summary> /// Au : Hieu Pham /// Check Name change history page display for pupil name. /// </summary> /// <param name="pupilName"></param> /// <returns></returns> public bool IsNameChangeHistoryForPupilName(string pupilName) { try { IWebElement titleElement = SeleniumHelper.FindElement(SimsBy.AutomationId("name_change_history_header_display_name")); if (titleElement.GetText().Equals(pupilName)) { return(true); } return(false); } catch (NoSuchElementException) { return(false); } }
public void ClickSave(bool isDialogDisplayed = false) { _saveButton.ClickByJS(); if (isDialogDisplayed) { try { IWebElement deleteButton = SeleniumHelper.FindElement(SimsBy.AutomationId("continue_with_delete_button")); if (deleteButton.IsExist()) { deleteButton.Click(); } } catch (Exception) { } } Wait.WaitForAjaxReady(By.CssSelector(".locking-mask")); Refresh(); }
/// <summary> /// Author: Ba.Truong /// Description: Click Add button to view allowance detail page /// </summary> /// <returns></returns> public static NewAllowancePage Create() { SeleniumHelper.Get(SimsBy.AutomationId("add_allowance_button")).ClickByJS(); Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask")); return(new NewAllowancePage()); }
/// <summary> /// Author: Huy.Vo /// Description: Init page /// </summary> /// <returns></returns> public PaySpinePage Create() { SeleniumHelper.Get(SimsBy.AutomationId("create_button")).ClickByJS(); Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask")); return(new PaySpinePage()); }
public MedicalDetailsDialog ClickMedicalDetailsIcon() { _medicalDetailsIcon.ClickByJS(); Wait.WaitForElementEnabled(SimsBy.AutomationId("popover_toolbar_action-Medical-Details")); return(new MedicalDetailsDialog()); }
/// <summary> /// Author: Huy.Vo /// Description: Init page /// </summary> /// <returns></returns> public AddNewApplicationDialog AddNewApplicationDialog() { SeleniumHelper.Get(SimsBy.AutomationId("add_new_application_button")).ClickByJS(); Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask")); return(new AddNewApplicationDialog()); }
public bool IsMessageSuccessDisplay() { return(SeleniumHelper.Get(SimsBy.AutomationId("status_success")).IsElementDisplayed()); }
public void ClickEditAddrss() { Wait.WaitForControl(SimsBy.AutomationId("edit_button")); _editNewButton.ClickAndWaitFor(SimsBy.AutomationId("find_address_detail"));; }
public NoteDialog Edit() { noteElement.FindElement(SimsBy.AutomationId("edit_button")).ClickByJS(); Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask")); return(new NoteDialog()); }
public LinkedPupilsDialog ClickLinkedPupilsIcon() { _linkedPupilsIcon.ClickByJS(); Wait.WaitForElementEnabled(SimsBy.AutomationId("popover_toolbar_action-Linked-Pupils")); return(new LinkedPupilsDialog()); }
public ContactDetailsDialog ClickContactDetailsIcon() { _contactDetailsIcon.ClickByJS(); Wait.WaitForElementEnabled(SimsBy.AutomationId("popover_toolbar_action-Contact-Summary")); return(new ContactDetailsDialog()); }
//private object waiter; #endregion #region Public methods /// <summary> /// Author: Huy.Vo /// Description: Init page /// </summary> /// <returns></returns> public SchoolIntakePage Create() { SeleniumHelper.Get(SimsBy.AutomationId("add_button")).ClickByJS(); Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask")); return(new SchoolIntakePage()); }
public void Save() { SeleniumHelper.Get(SimsBy.AutomationId("well_know_action_save")).ClickByJS(); Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask")); }
public SenRecordDetailPage ClickSenRecord() { SeleniumHelper.Get(SimsBy.AutomationId("service_navigation_contextual_link_SEN_Record")).Click(); Wait.WaitForAjaxReady(By.Id("nprogress")); return(new SenRecordDetailPage()); }
/// <summary> /// Author: Ba.Truong /// Description: Init page Training Course /// </summary> /// <returns></returns> public static TrainingCourseDetailsPage Create() { SeleniumHelper.Get(SimsBy.AutomationId("staff_training_courses_create_button")).ClickByJS(); Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask")); return(new TrainingCourseDetailsPage()); }
public PupilSummaryDialog ClickPupilSummaryIcon() { _summaryIcon.ClickByJS(); Wait.WaitForElementEnabled(SimsBy.AutomationId("popover_toolbar_action-Pupil-Summary")); return(new PupilSummaryDialog()); }
public By EventTileIdentifier(string automationID) { return(SimsBy.AutomationId(automationID)); }
public void ClickAddAddrss() { Wait.WaitForControl(SimsBy.AutomationId("add_new_button")); _addNewButton.ClickAndWaitFor(SimsBy.AutomationId("find_address_detail"));; }