title: TestNG error null point exception error
body: <p>Hi I am receiving following error can someone help me out with debugging below code,</p>
  
  <p>package testngpackg;</p>
  
  <pre><code>import java.util.concurrent.TimeUnit;
  
  import org.openqa.selenium.By;
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.chrome.ChromeDriver;
  import org.testng.annotations.BeforeMethod;
  import org.testng.annotations.Test;
  
  public class ARXNewTest {
  
       ChromeDriver driver;
      @BeforeMethod
      public void set()   {
      //ProfilesIni profile = new ProfilesIni();
      //FirefoxProfile testprofile = profile.getProfile("default");
  //  testprofile.setAcceptUntrustedCertificates(true);
      //testprofile.setAssumeUntrustedCertificateIssuer(true);
      System.setProperty("webdriver.chrome.driver", "C:\\Selenium Web Driver 3.0.1\\geckodriver-v0.12.0-win32\\geckodriver.exe");
       WebDriver driver = new ChromeDriver();
       String baseURL = "&lt;URL&gt;";
      driver.get(baseURL);
      driver.manage().timeouts().implicitlyWait(60,TimeUnit.SECONDS);
      }
  
    @Test
    public void OpenBrowser() {
        driver.findElement(By.linkText("Log In")).click();
          driver.switchTo().frame(0);
          driver.findElement(By.id("tx_username")).sendKeys("my email id");
  
  
    }
  
  
    }
  </code></pre>
  
  <p>Error</p>
  
  <p>FAILED: OpenBrowser</p>
  
  <pre><code>java.lang.NullPointerException
      at testngpackg.ARXNewTest.OpenBrowser(ARXNewTest.java:30)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)  at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:100)
      at org.testng.internal.Invoker.invokeMethod(Invoker.java:646)
      at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:811)
      at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1129)
  </code></pre>
  
  <p>I am getting null point error while execution of above code</p>