Exemplo n.º 1
0
        public void WorkerAdvanceSearch()
        {
            Initialize();
            var datarows = ExcelReader.ImportSpreadsheet(ExcelFileNames.WorkerAdvancedSearch);

            foreach (var datarow in datarows)
            {
                SearchWindow.SelectSearchElements(null, "Worker", SearchWindow.SearchTypeConstants.Advanced);
                WorkerAdvancedSearchWindow.EnterWorkerAdvancedSearchData(datarow);
                WorkerAdvancedSearchWindow.ClickSearchBtn();
                var worker = false;
                Playback.Wait(5000);
                var searchResults = WorkerAdvancedSearchWindow.GetWorkerSearchResultsWindowProperties();
                if (searchResults.Exists)
                {
                    WorkerAdvancedSearchWindow.SelectWorkerfromSearchResults(datarow.ItemArray[36].ToString());
                }
                WorkerAdvancedSearchWindow.SelectApplicationChkBox(datarow);
                if (WorkerSurveyWindow.VerifyWorkerProfileWindowDisplayed())
                {
                    WorkerSummaryWindow.ClickOnCloseBtn();
                    WorkerAdvancedSearchWindow.CloseSearchResultsWindow();
                    worker = true;
                }
                Factory.AssertIsTrue(worker, "Worker not found with given search criteria");
            }
            Cleanup();
        }
Exemplo n.º 2
0
        public void RaChangeWorkerStatus()
        {
            try
            {
                WindowsActions.KillEllisProcesses();
                App = EllisHome.LaunchEllisAsRAUser();
                var datarows = ExcelReader.ImportSpreadsheet(ExcelFileNames.WorkerAdvancedSearch);
                foreach (var datarow in datarows)
                {
                    SearchWindow.SelectSearchElements(null, "Worker", SearchWindow.SearchTypeConstants.Advanced);
                    WorkerAdvancedSearchWindow.EnterWorkerNameAsSearchData("TEST");
                    var worker = WorkerAdvancedSearchWindow.SelectWorkerfromSearchResults(datarow.ItemArray[36].ToString());
                    Factory.AssertIsTrue(worker, "Requested Worker not found");
                    if (!worker)
                    {
                        continue;
                    }

                    Playback.Wait(2000);
                    WorkerAdvancedSearchWindow.SelectApplicationChkBox(datarow);
                    WorkerSummaryWindow.SelectMainTab(WorkerSummaryWindow.WorkerProfileTabConstants.Survey);
                    Playback.Wait(1000);
                    Factory.AssertIsTrue(WorkerSurveyWindow.VerifyWorkerProfileWindowDisplayed(), "Workers Survey not Displayed");
                    WorkerSurveyWindow.EnterDatainSsn(datarow);
                    WorkerSurveyWindow.EnterDataInSurveyGrid();
                    WorkerSurveyWindow.EnterNotes(datarow);
                    Playback.Wait(1000);
                    Factory.AssertIsTrue(WorkerSurveyWindow.VerifyWorkerProfileWindowDisplayed(),
                                         "Worker Profile Window Not Displayed");
                }
            }
            finally
            {
                Cleanup();
            }
        }