catching timeout exception

This commit is contained in:
Marcello Stanisci 2017-11-22 11:18:34 +01:00
parent 5d816ca065
commit de461a3358
No known key found for this signature in database
GPG Key ID: 8D526861953F4C0F

View File

@ -200,7 +200,7 @@ def register(ctx):
try: try:
ctx.wait.until(EC.element_to_be_clickable((By.ID, ctx.wait.until(EC.element_to_be_clickable((By.ID,
"select-exchange"))) "select-exchange")))
except NoSuchElementException: except (NoSuchElementException, TimeoutException):
logger.error("Selecting exchange impossible") logger.error("Selecting exchange impossible")
return False return False
return True return True