Skip to main content
1 of 3
Rutvi Soni
  • 536
  • 1
  • 11
  • 27

How to run testcases on one browser

I have create testcases for the different different pages.but while runnig that file it's open in new browser every time.how to run it in single browser.i am calling below for every testcases so it's open in new browser.

@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();
        
    }
Rutvi Soni
  • 536
  • 1
  • 11
  • 27