Пример #1
0
 //Add new Advertised Jobs
 internal void AddingAdvertisedJobs()
 {
     //To skip the highlighted option
     SkipButton?.Click();
     System.Threading.Thread.Sleep(5000);
     // Populating the data from Excel
     ExcelLib.PopulateInCollection(Base.ExcelPath, "AdvisedJobs");
     System.Threading.Thread.Sleep(3000);
     OwnersSelect.Click();
     System.Threading.Thread.Sleep(3000);
     AdvertisedJob.Click();
     System.Threading.Thread.Sleep(3000);
     NewJobButton.Click();
     SelectPropertyForJob.Click();
     PropertyNameDropdown.Click();
     TitleForJob.SendKeys(ExcelLib.ReadData(2, "Value"));
     MaximumBudget.SendKeys(ExcelLib.ReadData(3, "Value"));
     JobDescription.SendKeys(ExcelLib.ReadData(4, "Value"));
     // Image upload
     Global.Driver.driver.FindElement(By.Id("file-upload")).Click();
     System.Threading.Thread.Sleep(10000);
     SendKeys.SendWait(@"E:\MVP Studio\Task-2\images.jpg");
     System.Threading.Thread.Sleep(10000);
     SendKeys.SendWait(@"{Enter}");
     System.Threading.Thread.Sleep(5000);
     SubmitForJob.Click();
 }
Пример #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();
        }
Пример #3
0
        //Adding Repayment,Expenses and Liabilities
        internal void RepaymentExpensesLiabilities()
        {
            //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();
            ClickingAddNewProperty.Click();
            //Value set for property page details
            PropertyName.SendKeys(ExcelLib.ReadData(2, "Value"));
            SearchAddress.SendKeys(ExcelLib.ReadData(33, "Value"));
            System.Threading.Thread.Sleep(5000);
            //Value set using google api
            var address = Global.Driver.driver.FindElements(By.ClassName("pac-item"))[0];

            address.Click();
            TargetRent.SendKeys(ExcelLib.ReadData(14, "Value"));
            LandArea.SendKeys(ExcelLib.ReadData(10, "Value"));
            BedRooms.SendKeys(ExcelLib.ReadData(11, "Value"));
            CarParks.SendKeys(ExcelLib.ReadData(12, "Value"));
            Description.SendKeys(ExcelLib.ReadData(13, "Value"));
            FloorArea.SendKeys(ExcelLib.ReadData(15, "Value"));
            BathRooms.SendKeys(ExcelLib.ReadData(16, "Value"));
            YearBuilt.SendKeys(ExcelLib.ReadData(9, "Value"));
            NextButton.Click();
            //Value set for financial details page
            System.Threading.Thread.Sleep(2000);
            PurchasePrice.SendKeys(ExcelLib.ReadData(17, "Value"));
            HomeValue.SendKeys(ExcelLib.ReadData(18, "Value"));
            Mortgage.SendKeys(ExcelLib.ReadData(19, "Value"));
            //Adding repayment option
            AddRepayment.Click();
            RepaymentAmount.SendKeys(ExcelLib.ReadData(2, "AddRepaymentfieldValue"));
            RepaymentStartDate.SendKeys(ExcelLib.ReadData(3, "AddRepaymentfieldValue"));
            //Adding expenses option
            AddExpense.Click();
            ExpenseAmount.SendKeys(ExcelLib.ReadData(2, "AddExpensefieldValue"));
            var ExpenseDescription = Global.Driver.driver.FindElement(By.ClassName("seven")).FindElement(By.ClassName("width")).FindElement(By.Id("Text1"));

            ExpenseDescription.SendKeys(ExcelLib.ReadData(3, "AddExpensefieldValue"));
            ExpenseDate.SendKeys(ExcelLib.ReadData(4, "AddExpensefieldValue"));
            NextButton2.Click();
            //Value set for financial details page
            TenantEmail.SendKeys(ExcelLib.ReadData(20, "Value"));
            FirstName.SendKeys(ExcelLib.ReadData(21, "Value"));
            LastName.SendKeys(ExcelLib.ReadData(22, "Value"));
            StartDate.SendKeys(ExcelLib.ReadData(23, "Value"));
            EndDate.SendKeys(ExcelLib.ReadData(24, "Value"));
            RentAmount.SendKeys(ExcelLib.ReadData(25, "Value"));
            PaymentStartDate.SendKeys(ExcelLib.ReadData(26, "Value"));
            //Adding liability option
            NewLiability.Click();
            Amount.SendKeys(ExcelLib.ReadData(2, "NewLiabilityFieldValue"));
            Save.Click();
        }
Пример #4
0
        //Add new property
        internal void AddingProperty()
        {
            //To skip the highlighted option
            SkipButton?.Click();
            System.Threading.Thread.Sleep(5000);
            // Populating the data from Excel
            ExcelLib.PopulateInCollection(Base.ExcelPath, "AddNewProperty");
            System.Threading.Thread.Sleep(5000);
            OwnersSelect.Click();
            System.Threading.Thread.Sleep(5000);
            PropertiesSelect.Click();
            ClickingAddNewProperty.Click();
            //Value set for property details page
            PropertyName.SendKeys(ExcelLib.ReadData(2, "Value"));
            SearchAddress.SendKeys(ExcelLib.ReadData(33, "Value"));
            System.Threading.Thread.Sleep(5000);
            //Value set using google api
            var address = Global.Driver.driver.FindElements(By.ClassName("pac-item"))[0];

            address.Click();
            TargetRent.SendKeys(ExcelLib.ReadData(14, "Value"));
            LandArea.SendKeys(ExcelLib.ReadData(10, "Value"));
            BedRooms.SendKeys(ExcelLib.ReadData(11, "Value"));
            CarParks.SendKeys(ExcelLib.ReadData(12, "Value"));
            Description.SendKeys(ExcelLib.ReadData(13, "Value"));
            FloorArea.SendKeys(ExcelLib.ReadData(15, "Value"));
            BathRooms.SendKeys(ExcelLib.ReadData(16, "Value"));
            YearBuilt.SendKeys(ExcelLib.ReadData(9, "Value"));
            imagebox.Click();
            //Image upload
            Global.Driver.driver.FindElement(By.Id("file-upload")).Click();
            System.Threading.Thread.Sleep(10000);
            SendKeys.SendWait("E:\\Document\\house.jpg");
            System.Threading.Thread.Sleep(10000);
            SendKeys.SendWait(@"{Enter}");
            System.Threading.Thread.Sleep(5000);
            NextButton.Click();
            System.Threading.Thread.Sleep(5000);
            //Value set for financial details page
            PurchasePrice.SendKeys(ExcelLib.ReadData(17, "Value"));
            HomeValue.SendKeys(ExcelLib.ReadData(18, "Value"));
            Mortgage.SendKeys(ExcelLib.ReadData(19, "Value"));
            NextButton2.Click();
            //Value set for Tenant details page
            TenantEmail.SendKeys(ExcelLib.ReadData(20, "Value"));
            FirstName.SendKeys(ExcelLib.ReadData(21, "Value"));
            LastName.SendKeys(ExcelLib.ReadData(22, "Value"));
            StartDate.SendKeys(ExcelLib.ReadData(23, "Value"));
            EndDate.SendKeys(ExcelLib.ReadData(24, "Value"));
            RentAmount.SendKeys(ExcelLib.ReadData(25, "Value"));
            PaymentStartDate.SendKeys(ExcelLib.ReadData(26, "Value"));
            Save.Click();
        }
Пример #5
0
        //Delete an existing Advertised Jobs
        internal void DeleteAdvertisedJobs()
        {
            //To skip the highlighted option
            SkipButton?.Click();
            System.Threading.Thread.Sleep(5000);
            // Populating the data from Excel
            ExcelLib.PopulateInCollection(Base.ExcelPath, "AdvisedJobs");
            System.Threading.Thread.Sleep(3000);
            OwnersSelect.Click();
            System.Threading.Thread.Sleep(3000);
            AdvertisedJob.Click();
            System.Threading.Thread.Sleep(3000);

            DeleteForJob.Click();
            DeleteOpt2.Click();
            ConfirmDelete.Click();
        }
Пример #6
0
        //Edit an existing Advertised Jobs
        internal void EditAdvertisedJobs()
        {
            //To skip the highlighted option
            SkipButton?.Click();
            System.Threading.Thread.Sleep(5000);
            // Populating the data from Excel
            ExcelLib.PopulateInCollection(Base.ExcelPath, "AdvisedJobs");
            System.Threading.Thread.Sleep(3000);
            OwnersSelect.Click();
            System.Threading.Thread.Sleep(3000);
            AdvertisedJob.Click();
            System.Threading.Thread.Sleep(3000);

            EditForJob.Click();
            EditedMaximumBudget.Clear();
            EditedMaximumBudget.SendKeys(ExcelLib.ReadData(3, "EditedValue"));
            SaveEdit.Click();
        }
Пример #7
0
        //Edit existing Property
        internal void editProperty()
        {
            //To skip the highlighted option
            SkipButton?.Click();
            System.Threading.Thread.Sleep(5000);
            // Populating the data from Excel
            //ExcelLib.PopulateInCollection(Base.ExcelPath, "AddNewProperty");
            System.Threading.Thread.Sleep(5000);
            OwnersSelect.Click();
            System.Threading.Thread.Sleep(5000);
            PropertiesSelect.Click();
            //Choosing edit option
            var editOption = Global.Driver.driver.FindElements(By.ClassName("segment"))[0].FindElement(By.ClassName("top-right-corner")).FindElement(By.TagName("i"));

            editOption.Click();
            System.Threading.Thread.Sleep(5000);
            EditProperty.Click();
            // Populating the data from Excel
            ExcelLib.PopulateInCollection(Base.ExcelPath, "AddNewProperty");
            EditedPropertyName.Clear();
            //Editing existing property
            EditedPropertyName.SendKeys(ExcelLib.ReadData(2, "Edited Value"));
            SaveEditedValue.Click();
        }