scraperwiki/wd40 — pull request #4 by pwaller (2014-05-23 11:31:47+00:00)
Title: Reattach to existing browser window if it's available

This shaves off a few seconds of browser startup. Significant improvement
if just running one or two tests repeatedly.

Code is slightly complicated because if you close the window manuall,
selenium doesn't recognize that the session has gone away and gives
a stale session which is broken. So we test it by checking to see if
we can ask for the current window name. If that returns an error, a new session is created.