tests: functional: Update detecting page changes

Several tests failed randomly (on a slightly slow machine) while trying to
detect that a page change has occurred. Workaround this by handling the
exception thrown.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2023-04-16 13:28:22 +05:30 committed by James Valleroy
parent fcbcf1775c
commit 4be7ce0f5d
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -94,7 +94,7 @@ class _PageLoaded():
is_stale = False
try:
self.element.has_class('whatever_class')
except StaleElementReferenceException:
except (StaleElementReferenceException, TypeError):
# After a domain name change, Let's Encrypt will restart the web
# server and could cause a connection failure.
if driver.find_by_id('netErrorButtonContainer'):