Example #1
0
 public void VerifyWorkerSurveyTab()
 {
     try
     {
         Initialize();
         LandingPage.SelectFromToolbar("Workers");
         var datarows = ExcelReader.ImportSpreadsheet(ExcelFileNames.WorkerSkills);
         foreach (var datarow in datarows.Where(
                      x => !(string.IsNullOrWhiteSpace(x.ItemArray[17].ToString()))))
         {
             var worker = WorkerSummaryWindow.SelectWorkerFromTable(datarow.ItemArray[17].ToString());
             if (worker)
             {
                 Playback.Wait(2000);
                 WorkerSummaryWindow.SelectMainTab(WorkerSummaryWindow.WorkerProfileTabConstants.Survey);
                 Playback.Wait(1000);
                 Factory.AssertIsTrue(WorkerSurveyWindow.VerifyWorkerProfileWindowDisplayed(),
                                      "Workers Survey Tab not Displayed");
                 WorkerSummaryWindow.ClickOnCloseBtn();
             }
             Factory.AssertIsTrue(worker, "Requested Worker not found");
         }
     }
     finally
     {
         Cleanup();
     }
 }
Example #2
0
        public void ClickOnChangeStatusBtnWorkerProfile()
        {
            Initialize();

            LandingPage.SelectFromToolbar("Workers");
            var datarows = ExcelReader.ImportSpreadsheet(ExcelFileNames.WorkerSkills);

            foreach (var datarow in datarows)
            {
                var worker = WorkerSummaryWindow.SelectWorkerFromTable(datarow.ItemArray[17].ToString());
                if (worker)
                {
                    Playback.Wait(2000);
                    Factory.AssertIsTrue(WorkerSurveyWindow.VerifyWorkerProfileWindowDisplayed(),
                                         "Worker Summary Tab not Displayed");
                    WorkerSummaryWindow.ClickOnChangeStatusBtn();
                    Factory.AssertIsTrue(WorkerChangeStatusWindow.VerifyChangeStatusWindowDisplayed(),
                                         "Change Status Window Not Displayed");
                    WorkerChangeStatusWindow.ClickOnCancelBtnStatusWindow();
                    Playback.Wait(2000);
                    Factory.AssertIsTrue(WorkerSummaryWindow.VerifyAlertPopUpDisplayed(), "Alert Pop Up Not Displayed");
                    WorkerSummaryWindow.CloseAlertPopUp();
                    WorkerSummaryWindow.ClickOnCloseBtn();
                }
                Factory.AssertIsTrue(worker, "Requested Worker not found");
            }

            Cleanup();
        }
Example #3
0
        public void BrowseForCustomerInNotesWindow()
        {
            Initialize();
            LandingPage.SelectFromToolbar("Workers");
            var datarows = ExcelReader.ImportSpreadsheet(ExcelFileNames.WorkerRating);

            foreach (var datarow in datarows)
            {
                var worker = WorkerSummaryWindow.SelectWorkerFromTable(datarow.ItemArray[10].ToString());
                if (worker)
                {
                    Playback.Wait(2000);
                    WorkerSummaryWindow.SelectMainTab(7);
                    WorkerRatingsandNotesWindow.SelectNotesInComboBox();
                    WorkerRatingsandNotesWindow.ClickOnBrowseBtn();
                    Factory.AssertIsTrue(WorkerRatingsandNotesWindow.VerifyCustomerSearchWindowDisplayed(),
                                         "Customer Search Window Not Displayed");
                    WorkerRatingsandNotesWindow.EnterDataCustomerSearchWindow(datarow);
                    WorkerRatingsandNotesWindow.ClickCancelnotes();
                    WorkerSummaryWindow.ClickOnCloseBtn();
                }
                Factory.AssertIsTrue(worker, "Requested Worker not found");
            }
            Cleanup();
        }
Example #4
0
        public void AddLicensesForWorker()
        {
            Initialize();
            LandingPage.SelectFromToolbar("Workers");
            var datarows = ExcelReader.ImportSpreadsheet(ExcelFileNames.WorkerSkills);

            foreach (var datarow in datarows)
            {
                var worker = WorkerSummaryWindow.SelectWorkerFromTable(datarow.ItemArray[17].ToString());
                if (worker)
                {
                    Playback.Wait(2000);
                    WorkerSummaryWindow.SelectMainTab(5);
                    Playback.Wait(1000);
                    Factory.AssertIsTrue(WorkerSurveyWindow.VerifyWorkerProfileWindowDisplayed(),
                                         "Workers Skills Tab not Displayed");
                    WorkerSkillsWindow.EnterLicenseData(datarow);
                    WorkerSkillsWindow.SelectDutyChkBox();
                    WorkerSkillsWindow.SelectVehicleChkBox();
                    WorkerSkillsWindow.ClickonSaveBtninSkillsTab();
                    Playback.Wait(1000);
                    Factory.AssertIsTrue(WorkerProfileDetailsWindow.VerifyWorkerPopUpDisplayed(),
                                         "Confirmation Window Not Displayed");
                    WorkerSkillsWindow.ClickonOkBtn();
                    WorkerSummaryWindow.ClickOnCloseBtn();
                }
                Factory.AssertIsTrue(worker, "Requested Worker not found");
            }
            Cleanup();
        }
Example #5
0
        public void AddRatingsForWorker()
        {
            Initialize();
            LandingPage.SelectFromToolbar("Workers");
            var datarows = ExcelReader.ImportSpreadsheet(ExcelFileNames.WorkerRating);

            foreach (var datarow in datarows)
            {
                var worker = WorkerSummaryWindow.SelectWorkerFromTable(datarow.ItemArray[10].ToString());
                if (worker)
                {
                    Playback.Wait(2000);
                    WorkerSummaryWindow.SelectMainTab(7);
                    Playback.Wait(1000);
                    Factory.AssertIsTrue(WorkerSurveyWindow.VerifyWorkerProfileWindowDisplayed(),
                                         "Workers Ratings and Notes Tab not Displayed");
                    WorkerRatingsandNotesWindow.SelectRatingsInComboBox();
                    Playback.Wait(1000);
                    Factory.AssertIsTrue(WorkerRatingsandNotesWindow.VerifyRatingsWindowDisplayed(),
                                         "Ratings Window Not Displayed");
                    WorkerRatingsandNotesWindow.EnterdataInRatingsWindow(datarow);
                    WorkerSummaryWindow.ClickOnCloseBtn();
                }
                Factory.AssertIsTrue(worker, "Requested Worker not found");
            }
            Cleanup();
        }
Example #6
0
        public void VerifyWorkerWithholdingsTab()
        {
            Initialize();
            LandingPage.SelectFromToolbar("Workers");
            var datarows = ExcelReader.ImportSpreadsheet(ExcelFileNames.WorkerWithholdings);

            foreach (var datarow in datarows)
            {
                var worker = WorkerSummaryWindow.SelectWorkerFromTable(datarow.ItemArray[14].ToString());
                if (worker)
                {
                    Playback.Wait(2000);
                    WorkerSummaryWindow.SelectMainTab(WorkerSummaryWindow.WorkerProfileTabConstants.Withholdings);
                    Playback.Wait(1000);
                    Factory.AssertIsTrue(WorkerSurveyWindow.VerifyWorkerProfileWindowDisplayed(),
                                         "Workers Withholdings Tab not Displayed");
                    WorkerWithHoldingsWindow.EnterDataInWithholdings(datarow);
                    Playback.Wait(1000);
                    Factory.AssertIsTrue(WorkerProfileDetailsWindow.VerifyWorkerPopUpDisplayed(),
                                         "Confirmation Window Not Displayed");
                    WorkerProfileDetailsWindow.ClickOnOkBtnPopUp();
                    WorkerSummaryWindow.ClickOnCloseBtn();
                }
                Factory.AssertIsTrue(worker, "Requested Worker not found");
            }

            Cleanup();
        }
Example #7
0
        public void VerifyWorkerExistingOrdersTab()
        {
            Initialize();
            LandingPage.SelectFromToolbar("Workers");
            var datarows = ExcelReader.ImportSpreadsheet(ExcelFileNames.WorkerGarnishment);

            foreach (var datarow in datarows)
            {
                var worker = WorkerSummaryWindow.SelectWorkerFromTable(datarow.ItemArray[8].ToString());
                if (worker)
                {
                    Playback.Wait(2000);
                    WorkerSummaryWindow.SelectMainTab(4);
                    Playback.Wait(1000);
                    Factory.AssertIsTrue(WorkerSurveyWindow.VerifyWorkerProfileWindowDisplayed(),
                                         "Workers Garnishment Existing Orders Tab not Displayed");
                    WorkerGarnishmentsWindow.SelectDataInComboBox(datarow);
                    Playback.Wait(2000);
                    WorkerSummaryWindow.ClickOnCloseBtn();
                }
                Factory.AssertIsTrue(worker, "Requested Worker not found");
            }

            Cleanup();
        }
Example #8
0
        public void VerifyWorkerProfileFromActiveWorkers()
        {
            Initialize();
            LandingPage.SelectFromToolbar("Workers");
            var datarows = ExcelReader.ImportSpreadsheet(ExcelFileNames.WorkerIdentity);

            foreach (var datarow in datarows)
            {
                var worker = WorkerSummaryWindow.SelectWorkerFromTable(datarow.ItemArray[8].ToString());
                if (worker)
                {
                    Playback.Wait(2000);
                    Factory.AssertIsTrue(WorkerSurveyWindow.VerifyWorkerProfileWindowDisplayed(),
                                         "Workers Profile Window not Displayed");
                    WorkerSummaryWindow.ClickOnCloseBtn();
                }
                Factory.AssertIsTrue(worker, "Requested Worker not found");
            }

            Cleanup();
        }
Example #9
0
        public void VerifyWorkerPaymentMethodTab()
        {
            Initialize();
            LandingPage.SelectFromToolbar("Workers");
            var datarows = ExcelReader.ImportSpreadsheet(ExcelFileNames.WorkerVerification);

            foreach (var datarow in datarows)
            {
                var worker = WorkerSummaryWindow.SelectWorkerFromTable(datarow.ItemArray[19].ToString());
                if (worker)
                {
                    Playback.Wait(2000);
                    WorkerSummaryWindow.SelectMainTab(WorkerSummaryWindow.WorkerProfileTabConstants.ProfileDetails);
                    WorkerSummaryWindow.SelectInnerTab(WorkerSummaryWindow.WorkerProfileTabConstants.ProfileDetails,
                                                       "Payment Method");
                    Playback.Wait(1000);
                    Factory.AssertIsTrue(WorkerSurveyWindow.VerifyWorkerProfileWindowDisplayed(),
                                         "Workers Profile Payment Method Tab not Displayed");
                    SelectRadioButton.Selection(datarow.ItemArray[18].ToString());
                    WorkerProfileDetailsWindow.ClickOnEditBankDetailsBtn();
                    Factory.AssertIsTrue(WorkerProfileDetailsWindow.VerifyBankPopUpDisplayed(),
                                         "Bank PopUp Not Displayed");
                    WorkerProfileDetailsWindow.EnterDataInBankPopUp(datarow);
                    Factory.AssertIsTrue(WorkerProfileDetailsWindow.VerifyBankConfirmationPopUpDisplayed(),
                                         "Bank Confirmation Pop Up Not Displayed");
                    WorkerProfileDetailsWindow.ClickOnOkBankConfirmation();
                    WorkerProfileDetailsWindow.ClickOnSaveBtnPayment();
                    Factory.AssertIsTrue(WorkerProfileDetailsWindow.VerifyWorkerPopUpDisplayed(),
                                         "Confirmation Window Not Displayed");
                    WorkerProfileDetailsWindow.ClickOnOkBtnPopUp();
                    WorkerSummaryWindow.ClickOnCloseBtn();
                }
                Factory.AssertIsTrue(worker, "Requested Worker not found");
            }

            Cleanup();
        }
Example #10
0
 public void VerifyWorkerVerificationTab()
 {
     try
     {
         Initialize();
         LandingPage.SelectFromToolbar("Workers");
         var datarows = ExcelReader.ImportSpreadsheet(ExcelFileNames.WorkerVerification);
         foreach (var datarow in datarows.Where(x => !x.ItemArray[19].ToString().Equals(string.Empty)))
         {
             var worker = WorkerSummaryWindow.SelectWorkerFromTable(datarow.ItemArray[19].ToString());
             if (worker)
             {
                 Playback.Wait(2000);
                 WorkerSummaryWindow.SelectMainTab(WorkerSummaryWindow.WorkerProfileTabConstants.ProfileDetails);
                 WorkerSummaryWindow.SelectInnerTab(WorkerSummaryWindow.WorkerProfileTabConstants.ProfileDetails,
                                                    "I-9");
                 Playback.Wait(1000);
                 //Factory.AssertIsTrue(WorkerSurveyWindow.VerifyWorkerProfileWindowDisplayed(), "Workers Profile Verification Tab not Displayed");
                 WorkerProfileDetailsWindow.EnterDatainVerification(datarow);
                 WorkerProfileDetailsWindow.ClickOnSaveBtnVerification();
                 Playback.Wait(1000);
                 Factory.AssertIsTrue(WorkerProfileDetailsWindow.VerifyWorkerPopUpDisplayed(),
                                      "Confirmation Window Not Displayed");
                 WorkerProfileDetailsWindow.ClickOnOkBtnPopUp();
                 Playback.Wait(1000);
                 WorkerProfileDetailsWindow.ClickOnOkBtnPopUp();
                 Playback.Wait(1000);
                 WorkerSummaryWindow.ClickOnCloseBtn();
             }
             Factory.AssertIsTrue(worker, "Requested Worker not found");
         }
     }
     finally
     {
         Cleanup();
     }
 }
Example #11
0
 public void VerifyWorkerTempToHireTab()
 {
     try
     {
         Initialize();
         LandingPage.SelectFromToolbar("Workers");
         var datarows = ExcelReader.ImportSpreadsheet(ExcelFileNames.WorkerTemp);
         var datarow  = datarows.FirstOrDefault(x => !(x.ItemArray[7].ToString().Equals(String.Empty)));
         Factory.AssertIsFalse(datarow == null, "Couldn't find a worker in the data.");
         Globals.WorkerName = datarow.ItemArray[7].ToString();
         var worker = WorkerSummaryWindow.SelectWorkerFromTable(Globals.WorkerName);
         if (worker)
         {
             Playback.Wait(2000);
             WorkerSummaryWindow.SelectMainTab(WorkerSummaryWindow.WorkerProfileTabConstants.ProfileDetails);
             WorkerSummaryWindow.SelectInnerTab(WorkerSummaryWindow.WorkerProfileTabConstants.ProfileDetails,
                                                "Temp-to-Hire");
             Playback.Wait(1000);
             Factory.AssertIsTrue(WorkerSurveyWindow.VerifyWorkerProfileWindowDisplayed(),
                                  "Workers Profile Temp-to-Hire Tab not Displayed");
             WorkerProfileDetailsWindow.ClickonSearchBtnTemp();
             Factory.AssertIsTrue(WorkerProfileDetailsWindow.VerifyCustomerSearchPopUpDisplayed(),
                                  "Customer Search PopUp not Displayed");
             WorkerProfileDetailsWindow.EnterDatainCustomerSearch(datarow);
             Playback.Wait(1000);
             WorkerProfileDetailsWindow.EnterdataInTemp(datarow);
             Factory.AssertIsTrue(WorkerProfileDetailsWindow.VerifyWorkerPopUpDisplayed(), "Confirmation Window Not Displayed");
             //WorkerProfileDetailsWindow.ClickOnOkBtnPopUp();
             WorkerSummaryWindow.ClickOnCloseBtn();
         }
         Factory.AssertIsTrue(worker, "Requested Worker not found");
     }
     finally
     {
         Cleanup();
     }
 }
Example #12
0
        public void VerifyWorkerStatusTab()
        {
            Initialize();
            LandingPage.SelectFromToolbar("Workers");
            var datarows = ExcelReader.ImportSpreadsheet(ExcelFileNames.WorkerVerification);

            foreach (var datarow in datarows)
            {
                var worker = WorkerSummaryWindow.SelectWorkerFromTable(datarow.ItemArray[19].ToString());
                if (worker)
                {
                    WorkerSummaryWindow.SelectMainTab(WorkerSummaryWindow.WorkerProfileTabConstants.ProfileDetails);
                    WorkerSummaryWindow.SelectInnerTab(WorkerSummaryWindow.WorkerProfileTabConstants.ProfileDetails,
                                                       "Status");
                    Playback.Wait(1000);
                    Factory.AssertIsTrue(WorkerSurveyWindow.VerifyWorkerProfileWindowDisplayed(),
                                         "Workers Profile Status Tab not Displayed");
                    WorkerSummaryWindow.ClickOnCloseBtn();
                }
                Factory.AssertIsTrue(worker, "Requested Worker not found");
            }

            Cleanup();
        }