Fixed timing issue: refreshing after waiting for the page to load invalidated the wait for page to load.