public void OverrideWorker() { Initialize(); var datarows = ExcelReader.ImportSpreadsheet(ExcelFileNames.CreateWorker); foreach (var datarow in datarows) { if (datarow.ItemArray[1].ToString() == "Qualified") { WorkerIdentityWindow.ClickOnCreateApplicant(); WorkerIdentityWindow.EnterApplicantData(datarow); WorkerIdentityWindow.ClickOnContinueBtn(); var overRideBtn = WorkerAlreadyExistWindow.VerifyOverRideBtnEnabled(); if (overRideBtn) { WorkerAlreadyExistWindow.ClickOnOverideBtn(); Factory.AssertIsTrue(WorkerCompleteBehavioralSurveryWindow.VerifyCompleteBehavioralSurveyWindowDisplayed(), "Survey Window Not displayed"); } else { Factory.AssertIsTrue(overRideBtn, "No Workers Displayed To Override"); WorkerAlreadyExistWindow.ClickOnBackBtn(); WorkerIdentityWindow.ClickOnCancelBtn(); WorkerIdentityWindow.ClickOnOkBtnPopUp(); } } } Cleanup(); }
public void UpdateWorker() { Initialize(); var datarows = ExcelReader.ImportSpreadsheet(ExcelFileNames.CreateWorker); foreach (var datarow in datarows) { if (datarow.ItemArray[1].ToString() == "Qualified") { WorkerIdentityWindow.ClickOnCreateApplicant(); WorkerIdentityWindow.EnterApplicantData(datarow); WorkerIdentityWindow.ClickOnContinueBtn(); var updateBtn = WorkerAlreadyExistWindow.VerifyUpdateBtnEnabled(); if (updateBtn) { WorkerAlreadyExistWindow.ClickOnUpdateProfileBtn(); Factory.AssertIsTrue(WorkerSurveyWindow.VerifyWorkerProfileWindowDisplayed(), "Worker Summary Tab not Displayed"); WorkerSummaryWindow.ClickOnCloseBtn(); } else { Factory.AssertIsTrue(updateBtn, "No workers Displayed to Update"); WorkerAlreadyExistWindow.ClickOnBackBtn(); WorkerIdentityWindow.ClickOnCancelBtn(); WorkerIdentityWindow.ClickOnOkBtnPopUp(); } } } Cleanup(); }
public void ClickCancelBtnAlertWindow() { Initialize(); var datarows = ExcelReader.ImportSpreadsheet(ExcelFileNames.CreateWorker); foreach (var datarow in datarows) { if (datarow.ItemArray[1].ToString() == "Qualified") { Playback.Wait(1000); WorkerIdentityWindow.ClickOnCreateApplicant(); WorkerIdentityWindow.EnterApplicantData(datarow); WorkerIdentityWindow.ClickOnCancelBtn(); Factory.AssertIsTrue(WorkerIdentityWindow.VerifyAlertPopUpDisplayed(), "Alert PopUp Not Displayed. Entered Identity data is not cancelled"); WorkerIdentityWindow.ClickOnCancelBtnPopUp(); WorkerIdentityWindow.ClickOnCancelBtn(); WorkerIdentityWindow.ClickOnOkBtnPopUp(); } } Cleanup(); }