sleep calls refactored to consider browser specific timeouts