From 352d4db0d7218eb18df53534b8b4b37e3b302265 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 26 Oct 2020 17:57:01 +0100 Subject: [PATCH] e2e: add NoSuchElementException to @retry --- e2e/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/utils.py b/e2e/utils.py index a00932c68..aef8f135e 100644 --- a/e2e/utils.py +++ b/e2e/utils.py @@ -16,7 +16,7 @@ from django.test.testcases import TransactionTestCase from docker import DockerClient, from_env from docker.models.containers import Container from selenium import webdriver -from selenium.common.exceptions import TimeoutException +from selenium.common.exceptions import NoSuchElementException, TimeoutException from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.webdriver.remote.webdriver import WebDriver from selenium.webdriver.support.ui import WebDriverWait @@ -132,7 +132,7 @@ def retry(max_retires=3, exceptions=None): """Retry test multiple times. Default to catching Selenium Timeout Exception""" if not exceptions: - exceptions = [TimeoutException] + exceptions = [TimeoutException, NoSuchElementException] logger = get_logger()