Fresh browser per test
Page being translated from English to Dutch. Do you speak Dutch? Help us to translate it by sending us pull requests!
Start each test from a clean known state. Ideally, spin up a new virtual machine for each test. If spinning up a new virtual machine is not practical, at least start a new WebDriver for each test. For Firefox, start a WebDriver with your known profile.
FirefoxProfile profile = new FirefoxProfile(new File("pathToFirefoxProfile")); WebDriver driver = new FirefoxDriver(profile);