Пример #1
0
        public void ExecuteTest()
        {
            /*var location = Assembly.GetExecutingAssembly().Location;
             * var directory = Path.GetDirectoryName(location);
             * string projectDir = Directory.GetParent(directory).Parent.FullName;
             * var path = Path.Combine(projectDir, "TestData.xlsx");*/

            string filepath = new PathBuilder("TestData.xlsx").Build();

            ExcelUtil.PopulateInCollection(filepath);
            LoginPageObject pageLogin = new LoginPageObject();
            EAPageObject    pageEA    = pageLogin.Login(ExcelUtil.ReadData(1, "UserName"), ExcelUtil.ReadData(1, "Password"));

            pageEA.FillUserForm(ExcelUtil.ReadData(1, "Initial"), ExcelUtil.ReadData(1, "MiddleName"), ExcelUtil.ReadData(1, "FirstName"));
        }
Пример #2
0
        public void ExecuteTest()
        {
            // Log into application
            LoginPageObject pageLogin = new LoginPageObject();
            EAPageObject    pageEA    = pageLogin.Login("execute", "automation");

            pageEA.FillUserForm("LF", "Luke", "Brandon");


            //// Title
            //SeleniumSetMethods.SelectDropDown("TitleId", "Mr.", PropertyType.Id);

            ////Intial
            //SeleniumSetMethods.EnterText("Initial", "executeautomation", PropertyType.Name);

            //Console.WriteLine("The value from my Title is: ", SeleniumGetMethods.GetText("TitleId", PropertyType.Id));
            //Console.WriteLine("The value from my Initial is:", SeleniumGetMethods.GetText("Initial", PropertyType.Name));

            //// Click
            //SeleniumSetMethods.Click("Save", PropertyType.Name);
        }
Пример #3
0
        public void ExecuteTest()
        {
            // Initialize page by calling its reference
            EAPageObject page = new EAPageObject();

            page.textInitial.SendKeys("executeautomation");
            page.btnSave.Click();



            //// Title
            //SeleniumSetMethods.SelectDropDown("TitleId", "Mr.", PropertyType.Id);

            ////Intial
            //SeleniumSetMethods.EnterText("Initial", "executeautomation", PropertyType.Name);

            //Console.WriteLine("The value from my Title is: ", SeleniumGetMethods.GetText("TitleId", PropertyType.Id));
            //Console.WriteLine("The value from my Initial is:", SeleniumGetMethods.GetText("Initial", PropertyType.Name));

            //// Click
            //SeleniumSetMethods.Click("Save", PropertyType.Name);
        }
Пример #4
0
        public void ExecuteTest()
        {
            //first need to initliza the page by calling its reference
            EAPageObject page = new EAPageObject();

            //page.btnChooseFl.Click();

            page.fileUploads1.SendKeys("C:/Users/User/Desktop/OSF_CFP_2017[1071].pdf");
            page.fileUploads2.SendKeys("C:/Users/User/Desktop/OSF-CFP-2017.pdf");


            page.btnMerge.Click();


            /*
             * using (WebClient webClient = new WebClient())
             * {
             *  webClient.DownloadFile("https://www.pdfmerge.com/", "c:/tmp/pdf.pdf");
             * }
             */

            /*
             *
             * WebElement El = driver.findElement(By.id("'fileUploadField'"));
             * El.sendKeys("c:\\temp\\test.txt");
             */

            //can now directly pass text that we want to use
            //page.txtInitial.SendKeys("executeautomation");

            //page.btnSave.Click();

            /*
             * dont need these anymore since we created EAPageObject
             * //selecting the title
             * //going to call the custom method that i made
             * SeleniumSetMethods.SelectDropDown( "TitleId", "Mr.", PropertyType.Id);
             *
             * //initial
             * SeleniumSetMethods.EnterText("Initial", "executeautomation", PropertyType.Name);
             *
             * //testing out get method
             * Console.WriteLine("The value from my Title is: " + SeleniumGetMethods.GetTextFromDropDown("TitleId", PropertyType.Id));
             *
             * Console.WriteLine("The value from my Initial is: " + SeleniumGetMethods.GetText("Initial", PropertyType.Name));
             *
             * //The click button
             * SeleniumSetMethods.Click("Save", PropertyType.Name);
             * /*
             *
             *
             *
             *
             * /*
             * //EnterText(element, value, type)
             *
             * //to find this you go to chrome, inspect elements after rigth clicking
             * //and then find the text box and the name for the text box which is "q"
             * IWebElement element = PropertiesCollection.driver.FindElement(By.Name("q"));
             *
             * //What will actually get send to the google search text box
             * element.SendKeys("This is the shit!!!");
             *
             * Console.WriteLine("Executed test");
             */
        }