def SeleniumAction(f):
  @functools.wraps(f)
  def Decorator(*args, **kwargs):
    delay = 0.2
    num_attempts = 15
    cur_attempt = 0
    while True:
      try:
        return f(*args, **kwargs)
      except exceptions.WebDriverException as e:
        logging.warn("Selenium raised %s", utils.SmartUnicode(e))

        cur_attempt += 1
        if cur_attempt == num_attempts:
          raise

        time.sleep(delay)

  return Decorator
Tests if the cooling time allows a user to login
dataset/ETHPy150Open google/grr/grr/lib/test_lib.py/SeleniumAction--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/django-axes-1.4.0/axes/tests.py/AccessAttemptTest.test_cooling_off