Design issue in Cucumber spring WebDriver quit in @After method
问题 I have a design issue when I am trying to build a framework using cucumber, selenium and cucumber-spring. My expected behavior is to quit WebdDriver instance for every scenario. But Here is my page objects in src\main\java @Component public class BasePage { WebDriver driver; public BasePage(WebDriver driver) { this.driver = driver; PageFactory.initElements(driver, this); } public WebDriver getDriver() { return this.driver; } } Here is another page object class which extends the Base class.