public void ATC6365c_CRMTESTINGEndtoEndSingleFormBPayAXSuccess() { #region Start Up Excel MyBook = MyApp.Workbooks.Open(DatasourceDir + @"\TenancyRequests.xlsx", 0, false, 5, "", "", true, Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0); MySheet = (Excel.Worksheet)MyBook.Sheets[Properties.Settings.Default.ENVIRONMENT.ToString()]; MyRange = MySheet.UsedRange; //Get specific row for the data int testDataRows = MyRange.Rows.Count; int MyRow = 0; for (int i = 2; i <= testDataRows; i++) { if (MyRange.Cells[i, 1].Value.ToString() == "6365") { MyRow = i; break; } } #endregion string tenancyRequest = MyRange.Cells[MyRow, TenancyRequestSchema.GetColumnIndex("TR_NUMBER")].Value.ToString(); User user = this.environment.GetUser(SecurityRole.RBSOfficer); new LoginDialog().Login(user.Id, user.Password); HomePage homePage = new HomePage(driver); homePage.HoverCRMRibbonTab(); homePage.ClickRBSRibbonButton(); homePage.HoverRBSRibbonTab(); homePage.ClickRtaTenancyRequestRibbonButton(); TenancyRequestsSearchPage tenancyRequestsSearchPage = new TenancyRequestsSearchPage(driver); tenancyRequestsSearchPage.SetPageFilterList("All Tenancy Requests"); Table table = new Table(tenancyRequestsSearchPage.GetSearchResultTableColHeadings()); table.ClickTableColumnHeader("Created On"); table.ClickTableColumnHeader("Created On"); table = new Table(tenancyRequestsSearchPage.GetSearchResultTable()); StringAssert.Contains(table.GetCellValue("Name", tenancyRequest, "Status Reason"), "Completed"); StringAssert.Contains(table.GetCellValue("Name", tenancyRequest, "Processing Status"), "Financials processing successful"); #region Shut down Excel MyBook.Save(); MyBook.Close(); MyApp.Quit(); #endregion }