コード例 #1
0
        public void VerifyWorkerAddressTab()
        {
            Initialize();
            LandingPage.SelectFromToolbar("Workers");
            var datarows = ExcelReader.ImportSpreadsheet(ExcelFileNames.WorkerAddress);

            foreach (var datarow in datarows)
            {
                var worker = WorkerSummaryWindow.SelectWorkerFromTable(datarow.ItemArray[14].ToString());
                if (worker)
                {
                    Playback.Wait(2000);
                    WorkerSummaryWindow.SelectMainTab(WorkerSummaryWindow.WorkerProfileTabConstants.ProfileDetails);
                    WorkerSummaryWindow.SelectInnerTab(WorkerSummaryWindow.WorkerProfileTabConstants.ProfileDetails,
                                                       "Addresses");
                    Playback.Wait(1000);
                    Factory.AssertIsTrue(WorkerSurveyWindow.VerifyWorkerProfileWindowDisplayed(),
                                         "Workers Profile Addresses Tab not Displayed");
                    WorkerProfileDetailsWindow.EnterDataInAddressTab(datarow);
                    Factory.AssertIsTrue(WorkerGeoCodeWindow.VerifyGeoCodeWindowDisplayed(), "Geo Code Window Not Displayed");
                    WorkerGeoCodeWindow.ClickOnOkBtn();
                    Factory.AssertIsTrue(WorkerVertexGeoCodeWindow.VerifyWorkerVertexGeoCodeWindowDisplayed(),
                                         " Worker Vertex Geo Code Window Not Displayed");
                    WorkerVertexGeoCodeWindow.ClickOnOkBtn();
                    Factory.AssertIsTrue(WorkerProfileDetailsWindow.VerifyWorkerPopUpDisplayed(),
                                         "Confirmation Window Not Displayed");
                    WorkerProfileDetailsWindow.ClickOnOkBtnPopUp();
                    WorkerSummaryWindow.ClickOnCloseBtn();
                }
                Factory.AssertIsTrue(worker, "Requested Worker not found");
            }

            Cleanup();
        }