e2e: add NoSuchElementException to @retry

This commit is contained in:
Jens Langhammer 2020-10-26 17:57:01 +01:00
parent 4b665cfb8f
commit 352d4db0d7
1 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ from django.test.testcases import TransactionTestCase
from docker import DockerClient, from_env from docker import DockerClient, from_env
from docker.models.containers import Container from docker.models.containers import Container
from selenium import webdriver 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.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.remote.webdriver import WebDriver from selenium.webdriver.remote.webdriver import WebDriver
from selenium.webdriver.support.ui import WebDriverWait 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""" """Retry test multiple times. Default to catching Selenium Timeout Exception"""
if not exceptions: if not exceptions:
exceptions = [TimeoutException] exceptions = [TimeoutException, NoSuchElementException]
logger = get_logger() logger = get_logger()