Moved wait for page load to the right place.

Change-Id: I9b2b0aa5954ef634c4bf1ef74c64af4bb3332187