Пример #1
0
        //[Parallelizable(ParallelScope.All)]
        public void CanSearch_Edge([Values("people")] string term)
        {
            var driver = new EdgeDriver();

            driver.Url = "http://www.bing.com/";
            driver.Navigate();

            BingSearchPage page = PageFactory.InitElements <BingSearchPage>(driver);

            page.SearchTerm(term);

            //Thread.Sleep(2000);

            var title = driver.Title;

            driver.Quit();
            driver.Close();

            Assert.That(title, Is.EqualTo(term + " - Bing"));
        }
Пример #2
0
        //[Parallelizable(ParallelScope.All)]
        public void CanSearch_Ie([Values("people")] string term)
        {
            var options = new InternetExplorerOptions();
            //options.EnsureCleanSession = true;
            //options.ForceCreateProcessApi = true;

            var driver = new InternetExplorerDriver(); //(options);

            driver.Url = "http://www.bing.com/";
            driver.Navigate();

            BingSearchPage page = PageFactory.InitElements <BingSearchPage>(driver);

            page.SearchTerm(term);

            //Thread.Sleep(2000);

            var title = driver.Title.ToString();

            driver.Quit();
            driver.Close();

            Assert.That(title, Is.EqualTo(term + " - Bing"));
        }