I have a number of Selenium/Java tests using testng, that start a new browser for each test, which is exactly what I need. However I now need to run a number of these single tests using the same browser.
Is this possible?
Or would this actually be one test doing all the actions of a number of tests, i.e. combine tests 1, 2 and 3 into one test?
Here is a example of the beginning of one of my tests.
@Test
static void Test_0001() throws Exception
{
LogFile.logfile("--------------------- Start Log ---------------------");
WebDriver driver = new ChromeDriver();
driver.get("https://localhost:44300");
driver.manage().window().maximize();
driver.findElement(By.id("details-button")).click();
driver.findElement(By.id("proceed-link")).click();
Thread.sleep(6000);
driver.findElement(By.name("username")).sendKeys("User");
Thanks.