Exemplo n.º 1
0
        public void PropertyDetails()
        {
            //Enter the Property Name
            PropertyName.SendKeys(ExcelLib.ReadData(2, "PropertyName"));
            Thread.Sleep(500);

            //Click on Property Type drop down menu
            PropertyType.Click();

            //Clicking Short-Term Rental on the Property Type drop down menu
            PropertyTypeChoice.Click();
            Thread.Sleep(500);

            //Enter Street Number
            StreetNumber.SendKeys(ExcelLib.ReadData(2, "Number"));
            Driver.wait(1000);

            //Enter Street Name
            StreetName.SendKeys(ExcelLib.ReadData(2, "Street"));
            Driver.wait(1000);

            //Enter City Name
            CityName.SendKeys(ExcelLib.ReadData(2, "City"));
            Driver.wait(1000);

            //Enter PostCode
            PostCode.SendKeys(ExcelLib.ReadData(2, "PostCode"));
            Driver.wait(1000);

            //Enter Region Name
            Region.SendKeys(ExcelLib.ReadData(2, "Region"));
            Driver.wait(1000);

            //Enter Description
            Description.SendKeys(ExcelLib.ReadData(2, "Description"));
            Driver.wait(3000);

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

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

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

            //Enter Carparks
            Carparks.SendKeys(ExcelLib.ReadData(2, "Carparks"));
            Driver.wait(3000);

            //Enter Year Built
            YearBuilt.SendKeys(ExcelLib.ReadData(2, "YearBuilt"));
            Driver.wait(2000);

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

            FileUpload.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}");
            Driver.wait(2000);

            //Clicking on Next button

            Next.Click();
            Driver.wait(3000);
        }