public void ThenIMNavigatedToTheFinaceDetailsSection() { try { // Creates a toggle for the given test, adds all log events under it test = extent.CreateTest("Add New Property -- fill out property details form and go to Finance Details Section "); test.AssignCategory("Add New Property Testing"); // Create an class and object to call the method AddNewPropertyPage addNewProperty = new AddNewPropertyPage(); if (addNewProperty.IsFianceFormHeaderDisplayed()) { Base.test.Log(AventStack.ExtentReports.Status.Pass, "Test passed, go to Fiance Details Section successfull"); } else { Base.test.Log(AventStack.ExtentReports.Status.Fail, "Test failed, go to Fiance Details Section unsuccessfull"); } } catch (Exception e) { Base.test.Log(AventStack.ExtentReports.Status.Fail, "Test failed, go to Fiance Details Section unsuccessfull" + e.Message); } }
public void WhenIClickPreviousButtonOnTheTenantDetailsSection() { Thread.Sleep(3000); AddNewPropertyPage addNewProperty = new AddNewPropertyPage(); addNewProperty.GoBackToFianceForm(); }
public void WhenIFillAllTheFormsOfPropertyDetailsPageFinanceDetailsPageAndTenantDetailsPageAndClickSaveButton() { AddNewPropertyPage addNewPropertyPage = new AddNewPropertyPage(); //Fill details of AddNewProperty Page. addNewPropertyPage.FillAllFieldsWithoutTickOwnerOccupied(); //Verify addNewPropertyPage addNewPropertyPage.VerifyPropertyDetailsPage(); //Click Next button and move to financedetailsPage FinancedetailsPage financedetailsPage = addNewPropertyPage.ClickNext(); //Fill the detail financedetailsPage.FillFinanceDetailsPage(); //Add repayment financedetailsPage.FillAddRepayment(); //Verify Finance Detail Page financedetailsPage.VerifyFinanceDetailsPage(); //Goto to Tenant Detail Page TenantDetailsPage tenantDetailsPage = financedetailsPage.ClickNext(); // fill the data of tenantDetailsPage tenantDetailsPage.FillTheDetails(); // verify tenantDetailsPage tenantDetailsPage.VerifyTenantDetailsPage(); // Click save button PropertyOwnerPage propertyOwnerPageSavedNewPro = tenantDetailsPage.ClickSave(); }
public void GivenIMAlreadyOnTheFinanceDetailsSection() { //Go to Finance Section AddNewPropertyPage addNewProperty = new AddNewPropertyPage(); addNewProperty.AddPropertyDetails(); addNewProperty.GotoFinanceForm(); }
public void GivenIHaveAddedANewProperty() { AddNewPropertyPage addNewProperty = new AddNewPropertyPage(); addNewProperty.AddPropertyDetails(); addNewProperty.GotoFinanceForm(); addNewProperty.AddFinanceDetails(); addNewProperty.GotoTenantForm(); addNewProperty.AddTenantDetails(); addNewProperty.SaveProperty(); }
public void PO_SearchPropertyAfterAddingNewProperty() { // Creates a toggle for the given test, adds all log events under it test = extent.StartTest("Search property after adding a new property"); test.AssignCategory("New Add Property"); //Go to my properties page DashboardPage dashboard = new DashboardPage(); dashboard.GoToMyPropertiesPage(); //Get new property name from the excel file ExcelLib.PopulateInCollection(Base.ExcelPath, "Property Details"); String PropertyName = ExcelLib.ReadData(2, "Property Name"); //Search this property under my properties page and delete the property which has the same name as new property MyPropertiesPage myProperty = new MyPropertiesPage(); if (myProperty.SearchAPropertySuccessfully(PropertyName)) { myProperty.DeleteAProperty(PropertyName); } //Click add new property button and go to add new property page myProperty.AddNewProperty(); #region Add new property AddNewPropertyPage addNewProperty = new AddNewPropertyPage(); //Fill out property details form and go to finance details form addNewProperty.AddPropertyDetails(); addNewProperty.GotoFinanceForm(); //Fill out finance details form and go to tenant details form addNewProperty.AddFinanceDetails(); addNewProperty.GotoTenantForm(); //Fill out tenant details page and save new property addNewProperty.AddTenantDetails(); addNewProperty.SaveProperty(); #endregion //Do the validation if (myProperty.SearchAPropertySuccessfully(PropertyName)) { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test passed, successfully search this new added property"); } else { Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test falied, fail to search this new added property"); } }
public void AddPropertyDetails() { BaseClass baseClass = new BaseClass(driver); baseClass.BrowserFunctions(); LoginPage loginPage = new LoginPage(driver); loginPage.Login("*****@*****.**", "ntmv2682"); Assert.True(driver.Title.Contains("Dashboard")); DashboardPage dashboardPage = new DashboardPage(driver); dashboardPage.Dashboard(); Assert.True(driver.Title.Contains("Properties")); PropertiesPage propertiesPage = new PropertiesPage(driver); propertiesPage.Properties(); Assert.True(driver.Title.Contains("Add New Property")); AddNewPropertyPage addNewProperty = new AddNewPropertyPage(driver); addNewProperty.PropertyName("Villas"); addNewProperty.SearchAddress("1279 Great South Road, Runciman, New Zealand"); addNewProperty.Number("1279"); addNewProperty.Street("Great South Road"); addNewProperty.Suburb("Victoria"); addNewProperty.City("Runciman"); // addNewProperty.AcceptIfAlertExists(); addNewProperty.PostCode(25); // addNewProperty.AcceptIfAlertExists(); addNewProperty.PostCode(78); addNewProperty.Region("Auc"); // addNewProperty.AcceptIfAlertExists(); addNewProperty.Region("kland"); addNewProperty.TargetRent(425); addNewProperty.LandArea(520); addNewProperty.Bedrooms(3); addNewProperty.Carparks(2); addNewProperty.PropertyType("Affordable Housing"); addNewProperty.Description("House for sale"); addNewProperty.RentType("Weekly"); addNewProperty.FloorArea(410); addNewProperty.Bathrooms(2); addNewProperty.YearBuilt(1992); addNewProperty.ChooseFiles(); }
public void ThenIGoBackToTheFinaceDetailsSection() { try { // Creates a toggle for the given test, adds all log events under it test = extent.CreateTest("Add New Property -- Go back to Finance Details Section"); AddNewPropertyPage addNewProperty = new AddNewPropertyPage(); if (addNewProperty.IsFianceFormHeaderDisplayed()) { Base.test.Log(AventStack.ExtentReports.Status.Pass, "Test passed, go back to Finance Details Section successfull"); } else { Base.test.Log(AventStack.ExtentReports.Status.Fail, "Test failed, go back to Finance Details Section unsuccessfull"); } } catch (Exception e) { Base.test.Log(AventStack.ExtentReports.Status.Fail, "Test failed, go back to Finance Details Section unsuccessfull" + e.Message); } }
public void CreateNewProperty() { // Creates a toggle for the given test, adds all log events under it test = extent.StartTest("Create new property and Verity it" + GetDateAndTime.GetTimeNow()); //Now page is Dashboard, then go to PropertyOwnersPage PropertyOwnerPage propertyOwnerPage = new DashboardPage().GotoPropertyOwnersPage(); AddNewPropertyPage addNewPropertyPage = propertyOwnerPage.ClickAddNewPropertyBtn(); //Fill details of AddNewProperty Page. addNewPropertyPage.FillAllFieldsWithoutTickOwnerOccupied(); //Verify addNewPropertyPage addNewPropertyPage.VerifyPropertyDetailsPage(); //Click Next button and move to financedetailsPage FinancedetailsPage financedetailsPage = addNewPropertyPage.ClickNext(); //Fill the detail financedetailsPage.FillFinanceDetailsPage(); //Add repayment financedetailsPage.FillAddRepayment(); //Verify Finance Detail Page financedetailsPage.VerifyFinanceDetailsPage(); //Goto to Tenant Detail Page TenantDetailsPage tenantDetailsPage = financedetailsPage.ClickNext(); // fill the data of tenantDetailsPage tenantDetailsPage.FillTheDetails(); // verify tenantDetailsPage tenantDetailsPage.VerifyTenantDetailsPage(); // Click save button PropertyOwnerPage propertyOwnerPageSavedNewPro = tenantDetailsPage.ClickSave(); // Verify the result propertyOwnerPageSavedNewPro.SearchPropertiesWhichAdded(); }
public void ThenPopupAnConfirmationDialog() { try { // Creates a toggle for the given test, adds all log events under it test = extent.CreateTest("Add New Property -- Cancel add property under Property Details Section"); AddNewPropertyPage addNewProperty = new AddNewPropertyPage(); if (addNewProperty.IsCancelConfirmationDialogDisplayed()) { Base.test.Log(AventStack.ExtentReports.Status.Pass, "Test passed, pop up confirmation dialog successfully"); } else { Base.test.Log(AventStack.ExtentReports.Status.Fail, "Test failed, pop up confirmation dialog unsuccessfull"); } } catch (Exception e) { Base.test.Log(AventStack.ExtentReports.Status.Fail, "Test failed, pop up confirmation dialog unsuccessfull" + e.Message); } }
public void ThenIMNavigatedToTheTenantDetailsSection() { try { // Creates a toggle for the given test, adds all log events under it test = extent.CreateTest("Add New Property -- fill out finance details form and go to Tenant Details Section"); AddNewPropertyPage addNewProperty = new AddNewPropertyPage(); if (addNewProperty.IsTenantFormHeaderDisplayed()) { Base.test.Log(AventStack.ExtentReports.Status.Pass, "Test passed, go to Tenant Details Section successfully"); } else { Base.test.Log(AventStack.ExtentReports.Status.Fail, "Test failed, go to Tenant Details Section unsuccessfull"); } } catch (Exception e) { Base.test.Log(AventStack.ExtentReports.Status.Fail, "Test failed, go to Tenant Details Section unsuccessfull" + e.Message); } }
public void GivenClickAddNewPRopertyButton() { PropertyOwnerPage propertyOwnerPage = new PropertyOwnerPage(); AddNewPropertyPage addNewPropertyPage = propertyOwnerPage.ClickAddNewPropertyBtn(); }
public void WhenClickNextButtonOnTheFinanceDetailsSection() { AddNewPropertyPage addNewProperty = new AddNewPropertyPage(); addNewProperty.GotoTenantForm(); }
public void WhenIClickCancelButtonOnPropertyDetailsSection() { AddNewPropertyPage addNewProperty = new AddNewPropertyPage(); addNewProperty.CancelPropertyForm(); }
public void WhenClickNextButton() { AddNewPropertyPage addNewProperty = new AddNewPropertyPage(); addNewProperty.GotoFinanceForm(); }
public void WhenIEnterAllThePropertyDetails() { AddNewPropertyPage addNewProperty = new AddNewPropertyPage(); addNewProperty.AddPropertyDetails(); }
public void WhenIClickPreviousButtonOnTheFinaceDetailsSection() { AddNewPropertyPage addNewProperty = new AddNewPropertyPage(); addNewProperty.GoBackToPropertyForm(); }
public void WhenClickSaveButton() { AddNewPropertyPage addNewProperty = new AddNewPropertyPage(); addNewProperty.SaveProperty(); }
public void WhenIClickCancelButtonOnTheTenantDetailsSection() { AddNewPropertyPage addNewProperty = new AddNewPropertyPage(); addNewProperty.CanceTenantForm(); }