RE: New browser instance is opened for each scenario in a cucumber feature file

Whenever i run the feature file, each browser instance is opened for each scenario. I expect to run all my scenarios of a feature file in a single browser instance. PS: I have not defined the driver inside method annotated with Before hook

Am using java as programming language

sudhaganesh Default Asked on January 12, 2018 in Selenium WebDriver.
Add Comment
2 Answers

well i changed the variable driver to Static under class WebDriverManager and it worked

so private static WebDriver driver instead of private WebDriver driver

 

Default Answered on March 1, 2018.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.