public void SearchWithPageObject()
        {
            var driver = new FirefoxDriver();
            var googleSearchPage = new GoogleSearchPage(driver);

            googleSearchPage.Open();
            googleSearchPage.SearchFor("cats");

            var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(30));
            wait.Until(x => x.Title.ToLower().StartsWith("cats"));

            Assert.IsTrue(googleSearchPage.Title.Contains("cats"));
            driver.Quit();
        }
Exemple #2
0
        public void SearchWithPageObject()
        {
            var driver           = new FirefoxDriver();
            var googleSearchPage = new GoogleSearchPage(driver);

            googleSearchPage.Open();
            googleSearchPage.SearchFor("cats");

            var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(30));

            wait.Until(x => x.Title.ToLower().StartsWith("cats"));

            Assert.IsTrue(googleSearchPage.Title.Contains("cats"));
            driver.Quit();
        }