示例#1
0
        internal void SendRequest()
        {
            //Populate excel file
            ExcelLib.PopulateInCollection(Config.Keys_Resource.ExcelPath, "ListRental");
            Thread.Sleep(1000);

            //calling the common methods
            Common_methods();
            Thread.Sleep(500);

            //Select properties page
            PropertiesPage.Click();
            Thread.Sleep(1000);

            //Clicking on Send a Request button
            SendaRequest.Click();
            Thread.Sleep(1000);

            //Clicking on save button
            DueDate.Click();
            Thread.Sleep(1000);

            //Enter Request Description
            RequestDesc.SendKeys(ExcelLib.ReadData(2, "Description"));
            Driver.wait(2000);

            //Clicking on Send a Request Save button
            RequestSave.Click();
            Thread.Sleep(1000);
        }
示例#2
0
        internal void AddNewProperty()
        {
            // Populating the data from Excel
            ExcelLib.PopulateInCollection(Config.Keys_Resource.ExcelPath, "Register");
            Thread.Sleep(1000);

            //calling the common methods
            Common_methods();
            Thread.Sleep(500);

            //Select properties page
            PropertiesPage.Click();

            //Click on Add New Property button
            AddProperty.Click();

            //Calling Property details method
            PropertyDetails();

            //Calling Finance details method
            FinanceDetails();

            //Calling Tenant details method
            TenantDetails();
        }
示例#3
0
        public void Common_methods()
        {
            Global.Driver.wait(5);
            //Click on the Owners tab
            Ownertab.Click();

            //Select properties page
            PropertiesPage.Click();
        }
        //Go to my properties page
        public void GoToMyPropertiesPage()
        {
            InstructionSkipButton.Click();
            Thread.Sleep(2000);

            //Click on the Owners tab
            Driver.WaitForElementVisible(Driver.driver, By.XPath("//a[@href='/Home/Dashboard']"), 25);
            OwnerTab.Click();

            //Select properties page
            Driver.WaitForElementVisible(Driver.driver, By.XPath("html/body/div[1]/div/div[2]/div[1]/div/a[1]"), 15);
            PropertiesPage.Click();
        }
        public void Common_methods()
        {
            Global.Driver.wait(5);
            //Click on the Owners tab
            if (btnSkip.Displayed)
            {
                btnSkip.Click();
            }

            Ownertab.Click();

            //Select properties page
            PropertiesPage.Click();
        }
        //Common methods to navigate into the 'My Properties' page
        public void Common_methods()
        {
            //Skipping the actions on the Quick Links Window
            Global.Driver.wait(5);
            QuickLinksSkipButton.Click();

            Thread.Sleep(1000);

            //Click on the Owners tab
            Global.Driver.wait(10);
            Ownertab.Click();

            //Select properties page
            PropertiesPage.Click();
        }
示例#7
0
        internal void AddTenant()
        {
            //Populate excel file
            ExcelLib.PopulateInCollection(Config.Keys_Resource.ExcelPath, "Tenant");
            Thread.Sleep(1000);

            //calling the common methods
            Common_methods();
            Thread.Sleep(500);

            //Select properties page
            PropertiesPage.Click();

            TenantRentDetails();
        }
示例#8
0
文件: OwnerProperty.cs 项目: hnlord/A
        public void Common_methods()
        {
            Driver.wait(5);
            //Click on skip button on popup window
            SkipButton.Click();
            Thread.Sleep(1000);

            //Click on the Owners tab
            // Debug.Assert(Driver.driver.Title == "Login");

            Ownertab.Click();
            Thread.Sleep(1000);
            //Global.Driver.wait(5);
            //Select properties page
            PropertiesPage.Click();
            Thread.Sleep(1000);
        }
        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();
        }
示例#10
0
        public void Properties()
        {
            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"));
            driver.Quit();
        }
示例#11
0
        internal void SearchAProperty()
        {
            try
            {
                //Calling the common methods
                Common_methods();
                Thread.Sleep(500);

                //Select properties page
                PropertiesPage.Click();

                //Driver.wait(5);

                //Enter the value in the search bar
                SearchBar.SendKeys("TestingProperty");
                Thread.Sleep(500);
                //Global.Driver.wait(5);

                //Click on the search button
                SearchButton.Click();
                Thread.Sleep(1000);
                //Driver.wait(5);

                string ExpectedValue = "TestingProperty";
                string ActualValue   = Global.Driver.driver.FindElement(By.XPath("//div[@class='six wide column']/a/h3")).Text;

                //Assert.AreEqual(ExpectedValue, ActualValue);
                if (ExpectedValue == ActualValue)
                {
                    Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Test Passed, Search successfull");
                }

                else
                {
                    Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Test Failed, Search Unsuccessfull");
                }
            }

            catch (Exception e)
            {
                Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Test Failed, Search Unsuccessfull", e.Message);
            }
        }
示例#12
0
        internal void ListAsRental()
        {
            //Populate excel file
            ExcelLib.PopulateInCollection(Config.Keys_Resource.ExcelPath, "ListRental");
            Thread.Sleep(1000);

            //calling the common methods
            Common_methods();
            Thread.Sleep(500);

            //Select properties page
            PropertiesPage.Click();

            //Clicking on save button
            ListaRental.Click();
            Driver.wait(2000);

            //Enter Title
            Title.SendKeys(ExcelLib.ReadData(2, "Title"));
            Driver.wait(2000);

            //Enter moving cost
            MovingCost.SendKeys(ExcelLib.ReadData(2, "MovingCost"));
            Driver.wait(2000);

            //Enter List Description
            ListDescription.SendKeys(ExcelLib.ReadData(2, "Description"));
            Driver.wait(2000);

            //Enter List target rent
            ListTargetRent.SendKeys(ExcelLib.ReadData(2, "TargetRent"));
            Driver.wait(2000);

            //Enter Available date
            AvailableDate.Clear();
            Driver.wait(500);
            AvailableDate.SendKeys("31/08/2018");
            Driver.wait(2000);

            //Enter Occupant Count
            OccupantCount.SendKeys(ExcelLib.ReadData(2, "Occupants"));
            Driver.wait(2000);

            //Upload a file thru AutoIT
            Driver.wait(1000);
            AutoItX3 autoIT = new AutoItX3();

            Uploadingfile.Click();
            autoIT.WinActivate("Open");
            Thread.Sleep(1000);
            autoIT.Send(@"C:\Users\VictorFelix\source\repos\automationOnboardingSample-master\Keys_Onboarding\TestReports\Screenshots\home.jpg");
            Thread.Sleep(1000);
            autoIT.Send("{Enter}");
            Thread.Sleep(1000);

            //Clicking on Save
            ListSave.Click();
            Driver.wait(2000);

            //Clicking on OK on Alert
            //Driver.driver.SwitchTo().Alert().Accept();
            //Driver.wait(2000);

            //Click on the Owners tab
            Ownertab.Click();
            Thread.Sleep(1000);

            //Click on the Rental Listings button
            RentalListings.Click();
            Thread.Sleep(1000);

            //Search for added list property
            SearchBox.SendKeys(ExcelLib.ReadData(2, "Title"));
            Driver.wait(2000);

            //Clicking on Search icon
            SearchBtn.Click();
            Driver.wait(2000);
        }