Introducing a loop to wait for results tab to load