Exemple #1
0
        public void TestMethod1()
        {
            var loginPage = new AcceptanceTests.PageObjects.LoginPage();

            //lauch a valid web page
            IWebDriver browser = loginPage.LaunchBrowser("http://www.google.com");
            //IWebDriver browser = loginPage.LaunchBrowser("http://www.xyz.com");


            //test Google search textfield
            //Is Page Element Displayed with NO Timeout Parameter
            //var isFound1 = Libary.IsPageElementDisplayed(browser, RunTimeVars.ELEMENTSEARCH.NAME, "q");
            //var isFound1 = Libary.ImplicitWaitIsPageElementDisplayed(browser, RunTimeVars.ELEMENTSEARCH.NAME, "q", 10);
            //var element = Libary.ExplicitWaitGetPageElement(browser, RunTimeVars.ELEMENTSEARCH.NAME, "q", 5);
            var element = Libary.ImplicitWaitGetPageElement(browser, RunTimeVars.ELEMENTSEARCH.NAME, "q", 5);

            //test Google search textfield
            //Is Page Element Displayed with a Timeout Parameter
            //var isFound2 = Libary.ExplicitWaitIsPageElementDisplayed(browser, RunTimeVars.ELEMENTSEARCH.NAME, "q", 5);

            //test Google search textfield
            /// Wait until the page element is displayed
            /// Resutn the selected page element
            //var isFound3 = Libary.FluenttWaitIsPageElementDisplayed(browser, RunTimeVars.ELEMENTSEARCH.NAME, "q", 5);


            browser.Close();
        }