use waitForUrl to check redirect

Use waitForUrl method to check http redirect.