Пример #1
0
        public void ThenIMNavigatedToTheRentalListingsApplicationsPage()
        {
            test = extent.CreateTest("List A Rental -- deal with confirmation dialog and confirm to list");
            RentalListingsAndTenantApplications obj = new RentalListingsAndTenantApplications();

            if (obj.IsHeaderDisplayed())
            {
                test.Log(AventStack.ExtentReports.Status.Pass, "Test passed, successfully navigate to rental listings&applications page");
            }
            else
            {
                test.Log(AventStack.ExtentReports.Status.Fail, "Test failed, fail to navigate to rental listings&applications page");
            }
        }
Пример #2
0
            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");
                }
            }