Add a timeout waiting for the page to render correctly.

Thanks to bobsilverberg for the feedback.