/// <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"));
     }
 }
Esempio n. 2
0
        /// <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();
            }
        }
Esempio n. 3
0
 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)
     {}
 }
Esempio n. 4
0
 /// <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);
     }
 }
Esempio n. 5
0
 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)
     {
     }
 }
Esempio n. 6
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);
     }
 }
Esempio n. 7
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();
         }
     }
 }
Esempio n. 8
0
        public static bool IsServiceTypeExistedNew(String ServiceTypeId)
        {
            bool isExisted = true;

            try
            {
                isExisted = SeleniumHelper.IsElementExists(SimsBy.AutomationId(ServiceTypeId));
            }
            catch (Exception)
            {
                isExisted = false;
            }
            return(isExisted);
        }
Esempio n. 9
0
        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);
                }
            }
        }
Esempio n. 10
0
        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);
        }
Esempio n. 11
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().Equals(noteName))
                    {
                        return(new Note(note));
                    }
                }

                return(null);
            }
Esempio n. 12
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);
            }
        }
Esempio n. 13
0
 /// <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);
     }
 }
Esempio n. 14
0
 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();
 }
Esempio n. 15
0
 /// <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());
 }
Esempio n. 16
0
 /// <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());
 }
Esempio n. 17
0
 public MedicalDetailsDialog ClickMedicalDetailsIcon()
 {
     _medicalDetailsIcon.ClickByJS();
     Wait.WaitForElementEnabled(SimsBy.AutomationId("popover_toolbar_action-Medical-Details"));
     return(new MedicalDetailsDialog());
 }
Esempio n. 18
0
 /// <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());
 }
Esempio n. 19
0
 public bool IsMessageSuccessDisplay()
 {
     return(SeleniumHelper.Get(SimsBy.AutomationId("status_success")).IsElementDisplayed());
 }
Esempio n. 20
0
 public void ClickEditAddrss()
 {
     Wait.WaitForControl(SimsBy.AutomationId("edit_button"));
     _editNewButton.ClickAndWaitFor(SimsBy.AutomationId("find_address_detail"));;
 }
Esempio n. 21
0
 public NoteDialog Edit()
 {
     noteElement.FindElement(SimsBy.AutomationId("edit_button")).ClickByJS();
     Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask"));
     return(new NoteDialog());
 }
Esempio n. 22
0
 public LinkedPupilsDialog ClickLinkedPupilsIcon()
 {
     _linkedPupilsIcon.ClickByJS();
     Wait.WaitForElementEnabled(SimsBy.AutomationId("popover_toolbar_action-Linked-Pupils"));
     return(new LinkedPupilsDialog());
 }
Esempio n. 23
0
 public ContactDetailsDialog ClickContactDetailsIcon()
 {
     _contactDetailsIcon.ClickByJS();
     Wait.WaitForElementEnabled(SimsBy.AutomationId("popover_toolbar_action-Contact-Summary"));
     return(new ContactDetailsDialog());
 }
Esempio n. 24
0
        //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());
        }
Esempio n. 25
0
 public void Save()
 {
     SeleniumHelper.Get(SimsBy.AutomationId("well_know_action_save")).ClickByJS();
     Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask"));
 }
Esempio n. 26
0
 public SenRecordDetailPage ClickSenRecord()
 {
     SeleniumHelper.Get(SimsBy.AutomationId("service_navigation_contextual_link_SEN_Record")).Click();
     Wait.WaitForAjaxReady(By.Id("nprogress"));
     return(new SenRecordDetailPage());
 }
Esempio n. 27
0
 /// <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());
 }
Esempio n. 28
0
 public PupilSummaryDialog ClickPupilSummaryIcon()
 {
     _summaryIcon.ClickByJS();
     Wait.WaitForElementEnabled(SimsBy.AutomationId("popover_toolbar_action-Pupil-Summary"));
     return(new PupilSummaryDialog());
 }
Esempio n. 29
0
 public By EventTileIdentifier(string automationID)
 {
     return(SimsBy.AutomationId(automationID));
 }
Esempio n. 30
0
 public void ClickAddAddrss()
 {
     Wait.WaitForControl(SimsBy.AutomationId("add_new_button"));
     _addNewButton.ClickAndWaitFor(SimsBy.AutomationId("find_address_detail"));;
 }