public void TC_013_03() { try { try { test = extent.StartTest(" Add Tenants Detail for listed property"); OwnerNavigation ObjOwnerNavigation = new OwnerNavigation(); ObjOwnerNavigation.OwnerMethod(); ObjOwnerNavigation.SearchMethod(); Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Info, "Searched property to Add tenant"); } catch { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Error in Search property to Add tenant"); throw; } try { AddTenant ObjAddTenant = new AddTenant(); ObjAddTenant.AddTenantMethod(); Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Info, "Executed Add tenant"); } catch { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Error in execution of Add tenant"); throw; } try { AddTenantLiabilityDetails ObjAddLiabiltyMethod = new AddTenantLiabilityDetails(); ObjAddLiabiltyMethod.AddLiabiltyMethod(); ObjAddLiabiltyMethod.CompleteTenantMethod(); Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Info, "Tenant Details Added"); } catch { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Error while Adding Tenant Liability Details"); throw; } Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Added a new tenant to the listed Property"); } catch { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Error in Adding a new tenant to the listed Property"); } }
public void PO_AddNewTenant() { try { test = extent.StartTest("Check if user is able to Add Tenant using Add new tenant link in Property Owner Dashboard"); PODashboard ObjPODashboard = new PODashboard(); ObjPODashboard.DashboardMethod(); ObjPODashboard.AddTenantMethod(); AddTenant ObjAddTenant = new AddTenant(); ObjAddTenant.AddTenantMethod(); AddTenantLiabilityDetails ObjAddTenantLiability = new AddTenantLiabilityDetails(); ObjAddTenantLiability.AddLiabiltyMethod(); ObjAddTenantLiability.CompleteTenantMethod(); Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Verification of AddTenant link done"); } catch { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "There is issue with the methods used in Verification of AddTenant link"); } }