Пример #1
0
        public void Navigate(GoogleSearchPage googleSearchPage)
        {
            googleSearchPage.Navigate("http://www.google.com");

            googleSearchPage.GoogleSearchBar.SendKeys("Selenium");
            googleSearchPage.GoogleSearchBar.Submit();
            FoundResult.Click();
        }
Пример #2
0
        public void SelSearcInit()
        {
            _driver = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
            _driver.Manage().Window.Maximize();

            _googleSearchPage  = new GoogleSearchPage(_driver);
            _googleResultsPage = new GoogleResultsPage(_driver);
        }
Пример #3
0
        public void Test()
        {
            String actualText;

            app.driver.Navigate().GoToUrl(url);
            GoogleSearchPage googleSearchPage = new GoogleSearchPage(app.driver);

            googleSearchPage.SendTextToSearch(searchText);
            googleSearchPage.ClickSearchSubmitButton();
            actualText = googleSearchPage.GetTextOfResults(index);
            Assert.IsTrue(expectedText.Contains(actualText), "Expected text isn't exist in actual text");
        }
 public GoogleSearchSteps(IWebDriver driver)
 {
     googlePage = new GoogleSearchPage(driver);
 }
 public void GivenIOpenGooglePage()
 {
     googlePage = new GoogleSearchPage();
     googlePage.GoToGooglePage("http://www.google.com");
 }
 public static void GoogleSearchReturnsCorrectResponse(this GoogleSearchPage page)
 {
     Assert.IsTrue(page.SeeResultSiteTitle().Contains("C# Online Test"));
 }