I am mUrthy,I am writing below selenium script , when I am trying to execute scripts i am getting error please see the below script and error. Any one provide better solution for this. I am using latest versions for this.
Script:
package TestProject;
import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver;
public class FirstTestCase {
public static void main(String[] args) {
// TODO Auto-generated method stub
WebDriver driver;
System.setProperty("webdriver.gecko.driver", "C://GeckoDriver/geckodriver.exe");
WebDriver driver = new FirefoxDriver();
driver.get("http://www.gcrit.com/build3/admin/");
}
} Error: Exception in thread "main" java.lang.Error: Unresolved compilation problem: Duplicate local variable driver
at TestProject.FirstTestCase.main(FirstTestCase.java:12)