コード例 #1
0
        public void ThenIMNavigatedToMyPropertiesPage()
        {
            test = extent.CreateTest("List A Rental -- Deal with confirmation dialog and confirm to cancel");

            MyPropertiesPage obj = new MyPropertiesPage();

            if (obj.IsAddNewPropertyButtonDisplayed())
            {
                Base.test.Log(AventStack.ExtentReports.Status.Pass, "Test passed, successfully navigate to my properties page after confirm cancel");
            }
            else
            {
                Base.test.Log(AventStack.ExtentReports.Status.Fail, "Test falied, fail to navigate to my properties page after confirm cancel");
            }
        }
コード例 #2
0
        public void ThenNewPropertyIsAddedSuccessfullyAndIMNavigatedToThePropertyOwnerPage()
        {
            try
            {
                test = extent.CreateTest("Add New Property -- fill out tenant details form and save all information");
                MyPropertiesPage propertyOwner = new MyPropertiesPage();

                if (propertyOwner.IsAddNewPropertyButtonDisplayed())
                {
                    Base.test.Log(AventStack.ExtentReports.Status.Pass, "Test passed, save all the information successfull");
                }
                else
                {
                    Base.test.Log(AventStack.ExtentReports.Status.Fail, "Test falied, save all the information unsuccessfull");
                }
            }
            catch (Exception e)
            {
                Base.test.Log(AventStack.ExtentReports.Status.Fail, "Test failed, sace all the information unsuccessfull");
            }
        }