title: Testng launches the browser twise
body: <p>have created only one class and method but the testng launches the browser twice, but while using main method directly its launches the browser only once.</p>
  
  <pre><code>public class Testngcall {
  
      @Test
      public static void main() throws Exception
      {
  
          System.setProperty("webdriver.chrome.driver", "C:\\Users\\karthik\\chromedriver.exe");
          WebDriver driver = new ChromeDriver();
          driver.get("https://www.youtube.com/");
  
          Thread.sleep(3000);
          driver.close();
      }
  
  }
  </code></pre>