Skip to content

Instantly share code, notes, and snippets.

@brookslyrette
Created September 8, 2016 20:39
Show Gist options
  • Select an option

  • Save brookslyrette/3377deeceda8729c1c9c1224278ae5dd to your computer and use it in GitHub Desktop.

Select an option

Save brookslyrette/3377deeceda8729c1c9c1224278ae5dd to your computer and use it in GitHub Desktop.
public class ApplicationTest {
private static FirefoxDriver driver;
@BeforeClass
public static void setUp() throws IOException {
driver = new FirefoxDriver();
}
@Test
public void contextLoads() {
driver.get("https://localhost:8080");
WebDriverWait wait = new WebDriverWait(driver, 10);
wait.until(ExpectedConditions.textToBePresentInElementLocated(
By.id("hello"), "Hello, world!"));
}
@AfterClass
public static void tearDown() {
driver.quit();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment