/// <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"));
     }
 }
Exemple #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();
            }
        }
Exemple #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)
     {}
 }
Exemple #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);
     }
 }
Exemple #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)
     {
     }
 }
Exemple #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);
     }
 }
Exemple #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();
         }
     }
 }
Exemple #8
0
        public static bool IsServiceTypeExistedNew(String ServiceTypeId)
        {
            bool isExisted = true;

            try
            {
                isExisted = SeleniumHelper.IsElementExists(SimsBy.AutomationId(ServiceTypeId));
            }
            catch (Exception)
            {
                isExisted = false;
            }
            return(isExisted);
        }
Exemple #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);
                }
            }
        }
Exemple #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);
        }
Exemple #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);
            }
Exemple #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);
            }
        }
 /// <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);
     }
 }
Exemple #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();
 }
Exemple #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());
 }
Exemple #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());
 }
Exemple #17
0
 public MedicalDetailsDialog ClickMedicalDetailsIcon()
 {
     _medicalDetailsIcon.ClickByJS();
     Wait.WaitForElementEnabled(SimsBy.AutomationId("popover_toolbar_action-Medical-Details"));
     return(new MedicalDetailsDialog());
 }
Exemple #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());
 }
Exemple #19
0
 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"));;
 }
Exemple #21
0
 public NoteDialog Edit()
 {
     noteElement.FindElement(SimsBy.AutomationId("edit_button")).ClickByJS();
     Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask"));
     return(new NoteDialog());
 }
Exemple #22
0
 public LinkedPupilsDialog ClickLinkedPupilsIcon()
 {
     _linkedPupilsIcon.ClickByJS();
     Wait.WaitForElementEnabled(SimsBy.AutomationId("popover_toolbar_action-Linked-Pupils"));
     return(new LinkedPupilsDialog());
 }
Exemple #23
0
 public ContactDetailsDialog ClickContactDetailsIcon()
 {
     _contactDetailsIcon.ClickByJS();
     Wait.WaitForElementEnabled(SimsBy.AutomationId("popover_toolbar_action-Contact-Summary"));
     return(new ContactDetailsDialog());
 }
Exemple #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());
        }
 public void Save()
 {
     SeleniumHelper.Get(SimsBy.AutomationId("well_know_action_save")).ClickByJS();
     Wait.WaitForAjaxReady(SimsBy.CssSelector(".locking-mask"));
 }
Exemple #26
0
 public SenRecordDetailPage ClickSenRecord()
 {
     SeleniumHelper.Get(SimsBy.AutomationId("service_navigation_contextual_link_SEN_Record")).Click();
     Wait.WaitForAjaxReady(By.Id("nprogress"));
     return(new SenRecordDetailPage());
 }
Exemple #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());
 }
Exemple #28
0
 public PupilSummaryDialog ClickPupilSummaryIcon()
 {
     _summaryIcon.ClickByJS();
     Wait.WaitForElementEnabled(SimsBy.AutomationId("popover_toolbar_action-Pupil-Summary"));
     return(new PupilSummaryDialog());
 }
Exemple #29
0
 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"));;
 }