Replaces Thread.sleep() with AbstractWait.sleep() where appropriate