[Solved] How to pass the same driver instance in page Object model?
I can see you are declaring a new instance of WebDriver inside the @BeforeTest method. You need to use the WebDriver instance that you declared outside the @BeforeTest i.e. you have already declared static WebDriver driver; Use the same driver inside your @BeforeTest. So inside the before method, instead of doing WebDriver driver = new … Read more