diff --git a/tests/e2e/utils.py b/tests/e2e/utils.py index 619ea159f..6ab15fe93 100644 --- a/tests/e2e/utils.py +++ b/tests/e2e/utils.py @@ -17,7 +17,11 @@ 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 NoSuchElementException, TimeoutException +from selenium.common.exceptions import ( + NoSuchElementException, + TimeoutException, + WebDriverException, +) from selenium.webdriver.common.by import By from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.webdriver.remote.webdriver import WebDriver @@ -149,7 +153,7 @@ def retry(max_retires=3, exceptions=None): """Retry test multiple times. Default to catching Selenium Timeout Exception""" if not exceptions: - exceptions = [TimeoutException, NoSuchElementException] + exceptions = [WebDriverException, TimeoutException, NoSuchElementException] logger = get_logger()