예제 #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);
        }
예제 #2
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);
        }