New WebDriver instance per test method?

Viewed 10870

What's the best practice fort creating webdriver instances in Selenium-webdriver? Once per test method, per test class or per test run?

They seem to be rather (very!) expensive to spin up, but keeping it open between tests risks leaking information between test methods.

Or is there an alternative - is a single webdriver instance a single browser window (excluding popups), or is there a method for starting a new window/session from a given driver instance?

Thanks Matt

2 Answers
Related