= 10 Minutos com Maven, TestNG e Selenium = 1. Criar um novo projeto Maven no Eclipse: [[Image(maven1.png,450px)]] [[Image(maven2.png,450px)]] [[Image(maven3.png,450px)]] 2. Editar pom.xml para adicionar as dependencias do projeto logo abaixo da tag do projeto {{{ org.testng testng 5.14.1 test org.seleniumhq.selenium selenium 2.0b1 }}} Automaticamente o maven baixará todos as dependências e colocará no path do projeto. 3. Criar uma classe para testar a configuração: {{{ import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import org.testng.annotations.Test; public class FirefoxDriverExample { @Test public void testIt() { // Create a new instance of the firefox driver WebDriver driver = new FirefoxDriver(); // And now use this to visit Google driver.get("http://www.google.com"); // Find the text input element by its name WebElement element = driver.findElement(By.name("q")); // Enter something to search for element.sendKeys("Cheese!"); // Now submit the form. WebDriver will find the form for us from the element element.submit(); // Check the title of the page System.out.println("Page title is: " + driver.getTitle()); driver.close(); } } }}} 4. Rodar o teste usando o TestNG.