pom.xml)<dependency>
<groupId>org.openqa.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.26.0</version>
</dependency>quit() vs close()driver.close(): Closes the currently active browser window. If other tabs remain open, the driver session stays active.
- driver.quit(): Terminates the entire WebDriver session, kills the browser process, and frees OS memory. Always use in @AfterEach!