Ok, I can see how what is happening. When the first condition is encountered it evaluates to `False` because the window hasn't closed yet. However, the window then does close during the execution of the second condition, which causes WebDriver to go into an infinite wait. The fact that it does that is a separate issue, but the problem remains that I don't think we can use an `or` with the two wait conditions because of the disappearing window issue. That was why I introduced the `sleep` in the first place.

Any other suggestions, @davehunt?