What javascript? How can you be sure it'll be done in 1 second? If possible, I'd prefer this delegate the waiting out to an appropriate selenium method.