I have created some test cases in Eclipse
. But while running the testng.xml file it opens in a new browser every time. How do I run it in single browser? I am calling below for each test case, so it opens in a new browser each time.
@BeforeClass
public static void setup()
{
System.setProperty("webdriver.chrome.driver", "E:\\Selenium Jar\\chromedriver.exe");
ChromeOptions options = new ChromeOptions();
options.addArguments("--disable-extensions");
driver = new ChromeDriver(options);
driver.manage().window().maximize();
}