//implemented methods
        public override void InputFormFields()
        {
            base.InputFormFields();

            if (testCreationMode == CreateTestModes.CreateManualTest)
            {
                NumberOfItemsText.Wait(3).Clear();
                NumberOfItemsText.SendKeys("" + Data.NumberOfItems);
            }

            ExpandOptional();

            if (Data.Description != null)
            {
                DescriptionText.Wait(3).Clear();
                DescriptionText.SendKeys(Data.Description);
            }
        }
        //Enter request information in the send request form
        internal void AddRequstInformation()
        {
            // Populating the data from Excel
            ExcelLib.PopulateInCollection(Base.ExcelPath, "Send Request");

            string tenant = ExcelLib.ReadData(2, "Tenant");
            string type   = ExcelLib.ReadData(2, "Type");

            //choose tenant from dropdown list
            TenantText.Click();
            Driver.WaitForElementClickable(Driver.driver, By.XPath(String.Format("//div[@class='item'][contains(text(),'{0}')]", tenant)), 5);
            Driver.driver.FindElement(By.XPath(String.Format("//div[@class='item'][contains(text(),'{0}')]", tenant))).Click();

            //choose type from dropdown list
            SelectElement select2 = new SelectElement(TypeDropdown);

            select2.SelectByText(type);
            //enter description
            DescriptionText.SendKeys(ExcelLib.ReadData(2, "Description"));
            //upload files
            ChooseFilesButton.SendKeys(ExcelLib.ReadData(2, "Choose Files"));
        }
        internal void AddRequstInformation()
        {
            // Populating the data from Excel
            ExcelLib.PopulateInCollection(Base.ExcelPath, "Send Request");

            string tenant = ExcelLib.ReadData(2, "Tenant");
            string type = ExcelLib.ReadData(2, "Type");

            //choose tenant from dropdown list
            TenantText.Click();
            Driver.driver.FindElement(By.XPath(String.Format(".//*[@id='main-content']/section/div/div[1]/div[2]/div/div[2]/div[text()='{0}']", tenant))).Click();


            //choose type from dropdown list
            SelectElement select2 = new SelectElement(TypeDropdown);
            select2.SelectByText(type);
            //enter description
            DescriptionText.SendKeys(ExcelLib.ReadData(2,"Description"));
            //upload files
            ChooseFilesButton.SendKeys(ExcelLib.ReadData(2, "Choose Files"));

        }
Exemplo n.º 4
0
        //Fill out the list rental property form
        internal void AddRentalPropertyDetails()
        {
            // Populating the data from Excel
            ExcelLib.PopulateInCollection(Base.ExcelPath, "List Rental Property");

            SelectElement select1 = new SelectElement(SelectPropertyDropdown);

            select1.SelectByIndex(1);
            TitleText.SendKeys(ExcelLib.ReadData(2, "Title"));
            MovingCostText.SendKeys(ExcelLib.ReadData(2, "Moving Cost"));
            DescriptionText.SendKeys(ExcelLib.ReadData(2, "Description"));
            TargentRentText.SendKeys(ExcelLib.ReadData(2, "Target Rent"));

            AvailableDateDatepicker.Click();
            OccupantsCountText.SendKeys(ExcelLib.ReadData(2, "Occupants Count"));

            SelectElement select2 = new SelectElement(PetAllowedDropdown);

            select2.SelectByText("Yes");

            //upload file
            ChooseFilesButton.SendKeys(ExcelLib.ReadData(2, "Choose Files"));
        }
Exemplo n.º 5
0
        //Fill out the property details form
        internal void AddPropertyDetails()
        {
            // Populating the data from Excel
            ExcelLib.PopulateInCollection(Base.ExcelPath, "Property Details");

            PropertyTypeDropdownButton.Click();
            Driver.driver.FindElement(By.XPath("//div[@class='item'][contains(text(),'Short-Term Rental')]")).Click();

            // Navigating to Property Details using value from Excel
            PropertyNameText.SendKeys(ExcelLib.ReadData(2, "Property Name"));
            NumberText.SendKeys(ExcelLib.ReadData(2, "Number"));
            StreetText.SendKeys(ExcelLib.ReadData(2, "Street"));
            DescriptionText.SendKeys(ExcelLib.ReadData(2, "Description"));
            CityText.SendKeys(ExcelLib.ReadData(2, "City"));
            PostCodeText.SendKeys(ExcelLib.ReadData(2, "PostCode"));
            RegionText.SendKeys(ExcelLib.ReadData(2, "Region"));
            YearBuiltText.SendKeys(ExcelLib.ReadData(2, "Year Built"));
            TargetRentText.SendKeys(ExcelLib.ReadData(2, "Target Rent"));
            BedroomsText.SendKeys(ExcelLib.ReadData(2, "Bedrooms"));
            BathroomsText.SendKeys(ExcelLib.ReadData(2, "Bathrooms"));
            CarparksText.SendKeys(ExcelLib.ReadData(2, "Carparks"));

            UploadFileButton.SendKeys(ExcelLib.ReadData(2, "Choose Files"));
        }