Fixed several spots in the Selenium tests that could lead to race conditions.