public void ThenTheNewLiabilityShouldBeAddedSuccessfully() { test = extent.CreateTest("Add Tenant -- Add new liability details under liabilities details section"); test.AssignCategory("Add Tenant Testing"); //get the liability name and amount from excel file ExcelLib.PopulateInCollection(Base.ExcelPath, "Add Tenant"); String liabilityName = ExcelLib.ReadData(2, "Liability Name"); String amount = ExcelLib.ReadData(2, "Amount"); AddTenantPage addTenant = new AddTenantPage(); if (addTenant.FindLiabilitySuccessfully(liabilityName, amount)) { Base.test.Log(AventStack.ExtentReports.Status.Pass, "Test passed, successfully add new liability"); } else { Base.test.Log(AventStack.ExtentReports.Status.Fail, "Test failed, fail to add new liability"); } Thread.Sleep(6000); }