Skip to content

Instantly share code, notes, and snippets.

@steppat
Created May 29, 2013 15:09
Show Gist options
  • Save steppat/5671040 to your computer and use it in GitHub Desktop.
Save steppat/5671040 to your computer and use it in GitHub Desktop.
package br.com.caelum.produtos.aceitacao;
import org.junit.Assert;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
public class PaginaIndexIT {
@Test
public void testAoGerarSemTituloUmaMensagemEhApresentada() {
WebDriver driver = new FirefoxDriver();
//assumindo que o jetty roda no porta 9090
driver.get("http://localhost:9090");
WebElement html = driver.findElement(By.tagName("html"));
Assert.assertEquals(html.getText(),"Bem Vindo!");
driver.close();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment