示例#1
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();
        }