added wait for refresh test

it should be much safer to wait until the page is fully loaded again.