Created
November 21, 2010 00:42
-
-
Save AlfredoCasado/708311 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GoogleSearchTest { | |
private DefaultSelenium selenium; | |
private GoogleSearchPage googleSearchPage; | |
@Before | |
public void startSeleniumClient() { | |
selenium = new DefaultSelenium("localhost", 4444, "firefox", "http://www.google.com"); | |
googleSearchPage = new GoogleSearchPage(selenium); | |
selenium.start(); | |
} | |
@After | |
public void stopSeleniumClient() { | |
selenium.stop(); | |
} | |
@Test | |
public void searchQueryShouldBePartOfTheTitleOfTheResultPage() { | |
GoogleSearchResultPage googleResultPage = googleSearchPage.searchFor("Selenium OpenQA"); | |
assertThat(googleResultPage.title(), | |
containsString("Selenium OpenQA")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment