Skip to content

Instantly share code, notes, and snippets.

@ondrejmirtes
Created September 3, 2011 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ondrejmirtes/1191353 to your computer and use it in GitHub Desktop.
Save ondrejmirtes/1191353 to your computer and use it in GitHub Desktop.
Selenium 2.0
package fm;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import static org.junit.Assert.*;
public class HomepageTest {
@Test
public void testTitle(WebDriver driver) {
driver.get("http://localhost/");
assertEquals("Foo", driver.getTitle());
}
@Test
public void testSearchForm(WebDriver driver) {
//...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment