public void GivenIAlreadyListedARentalProperty() { ListRentalPropertyPage obj = new ListRentalPropertyPage(); obj.AddRentalPropertyDetails(); obj.SaveListRentalProperty(); Driver.driver.SwitchTo().Alert().Accept(); }
public void PO_SearchPropertyAfterListingRental() { // Creates a toggle for the given test, adds all log events under it test = extent.StartTest("Search the property after listing as rental"); test.AssignCategory("List A Rental"); //Go to my properties page DashboardPage dashboard = new DashboardPage(); dashboard.GoToMyPropertiesPage(); //Click list rental button and go to add list rental proeprty page MyPropertiesPage myProperty = new MyPropertiesPage(); myProperty.ListARental(); //Fill out the list rental property form and save ListRentalPropertyPage listrentalProerty = new ListRentalPropertyPage(); listrentalProerty.AddRentalPropertyDetails(); listrentalProerty.SaveListRentalProperty(); //handle the alert and click ok Driver.driver.SwitchTo().Alert().Accept(); //Go to the properties for rent page dashboard.GotoPropertiesForRentPage(); // Got the property title from excel ExcelLib.PopulateInCollection(Base.ExcelPath, "List Rental Property"); String searchPropertyTitle = ExcelLib.ReadData(2, "Title"); PropertiesForRentPage propertyForRent = new PropertiesForRentPage(); if (propertyForRent.SearchRentalPropertySuccessfully(searchPropertyTitle)) { test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test passed, successfully search this property after listing as a rental"); } else { test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test failed, fail to search this property after listing as a reantal"); } }
public void PO_ListAsRental() { // Creates a toggle for the given test, adds all log events under it test = extent.StartTest("List a property as rental"); test.AssignCategory("List A Rental"); //Go to my properties page DashboardPage dashboard = new DashboardPage(); dashboard.GoToMyPropertiesPage(); //Click list rental button and go to add list rental proeprty page MyPropertiesPage myProperty = new MyPropertiesPage(); myProperty.ListARental(); //Fill out the list rental property form and save ListRentalPropertyPage listrentalProerty = new ListRentalPropertyPage(); listrentalProerty.AddRentalPropertyDetails(); listrentalProerty.SaveListRentalProperty(); //handle the alert and click ok Driver.driver.SwitchTo().Alert().Accept(); RentalListingsAndTenantApplications rentalApplication = new RentalListingsAndTenantApplications(); if (rentalApplication.IsHeaderDisplayed()) { test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test passed, successfully navigate to rental listings&applications page after listing a rental"); } else { test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test failed, fail to navigate to rental listings&applications page after listing a rental"); } }
public void WhenIEnterAllTheRentalPropertyInformation() { ListRentalPropertyPage listRentalProperty = new ListRentalPropertyPage(); listRentalProperty.AddRentalPropertyDetails(); }