Hi folks,
Is there any need of test framework like TestNG or junit in web driver to run the tests.I have asked that question because when i install testNG into eclipse then it is not installed because it given a some error then i run the test without test framework.
This is my test Script which i run without Test framework.I have included all the jars.
package com.example2.tests;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
public class WebDriverTest {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("
http://www.google.com");
WebElement element = driver.findElement(By.name("q"));
element.sendKeys("CRICKET");
element.submit();
}
}
Thanks!
Vinod