Exemplo n.º 1
0
        public void Enter_Value_ListARentalPage()
        {
            // var SelectElement = new SelectElement(SelectProp);
            // SelectElement.SelectByIndex(1);

            Actions actions = new Actions(_driver);

            actions.MoveToElement(SelectProp);
            actions.Click();
            actions.SendKeys("1222 High Street, Taita, Lower Hutt, 5011");
            actions.Build().Perform();
            System.Threading.Thread.Sleep(50);


            Title.SendKeys("TestTitleNewToRent");
            Description.SendKeys("Description To Test");
            MovingCost.SendKeys("2000");
            TargetRent.SendKeys("200");
            AvailableDate.SendKeys("10/05/2019");
            System.Threading.Thread.Sleep(50);

            OccupantsCount.SendKeys("2");
            UploadPhoto.SendKeys(@"C:\Users\Mallik\Desktop\Test.jpg");
            System.Threading.Thread.Sleep(50);


            Save.Click();

            // IAlert alert = _driver.SwitchTo().Alert();
            //  alert.Accept();

            // System.Threading.Thread.Sleep(50);
        }
Exemplo n.º 2
0
        //Add a renatal property
        internal void ListARental()
        {
            //To skip the highlighted option
            SkipButton?.Click();
            System.Threading.Thread.Sleep(5000);
            // Populating the data from Excel
            ExcelLib.PopulateInCollection(Base.ExcelPath, "AddNewProperty");
            OwnersSelect.Click();
            System.Threading.Thread.Sleep(5000);
            PropertiesSelect.Click();
            ListRental.Click();
            //Value set for adding rental property
            SelectProperty.SendKeys(ExcelLib.ReadData(10, "RentalPropertyValue"));
            Title.SendKeys(ExcelLib.ReadData(2, "RentalPropertyValue"));
            MovingCost.SendKeys(ExcelLib.ReadData(3, "RentalPropertyValue"));
            RentalDescription.SendKeys(ExcelLib.ReadData(7, "RentalPropertyValue"));
            RentalTargetRent.SendKeys(ExcelLib.ReadData(4, "RentalPropertyValue"));
            Furnishing.SendKeys(ExcelLib.ReadData(8, "RentalPropertyValue"));
            AvailableDate.SendKeys(ExcelLib.ReadData(5, "RentalPropertyValue"));
            IdealTenant.SendKeys(ExcelLib.ReadData(9, "RentalPropertyValue"));
            Occupants.SendKeys(ExcelLib.ReadData(6, "RentalPropertyValue"));
            SaveRental.Click();

            IAlert alert = Global.Driver.driver.SwitchTo().Alert();

            alert.Accept();
        }
Exemplo n.º 3
0
        public void Enter_Value_ListARentalPage()
        {
            // var SelectElement = new SelectElement(SelectProp);
            // SelectElement.SelectByIndex(1);

            Actions actions = new Actions(_driver);

            actions.MoveToElement(SelectProp);
            actions.Click();
            actions.SendKeys("1222 High Street, Taita, Lower Hutt, 5011");
            actions.Build().Perform();
            System.Threading.Thread.Sleep(200);


            Title.SendKeys("TestTitleNewToRent");
            Description.SendKeys("Description To Test");
            MovingCost.SendKeys("2000");
            TargetRent.SendKeys("200");
            AvailableDate.Click();
            AvailableDate.Clear();
            AvailableDate.SendKeys("16/07/2019");
            System.Threading.Thread.Sleep(250);

            OccupantsCount.SendKeys("2");
            UploadPhoto.SendKeys(@"C:\Users\Mallik\Documents\Key-Project\property-connect-home.jpg");
            System.Threading.Thread.Sleep(150);

            Save.Click();
            _Wait.Until(condition: ExpectedConditions.ElementExists(By.Id("SearchBox")));

            // IAlert alert = _driver.SwitchTo().Alert();
            // alert.Accept();

            // System.Threading.Thread.Sleep(50);
        }
Exemplo n.º 4
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);
        }