mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 17:19:20 +00:00
bitbake: toaster/tests/selenium_helper_base: Handle WebDriverException
The WebDriverException can occur if elements are not present in the DOM yet. Catch and handle this. It is our most frequently occuring failure in automated testing now. (Bitbake rev: 006173cbd32116ff1cea59b2c99eead807be39bb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -27,7 +27,7 @@ from selenium.webdriver.common.by import By
|
||||
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
|
||||
from selenium.common.exceptions import NoSuchElementException, \
|
||||
StaleElementReferenceException, TimeoutException, \
|
||||
SessionNotCreatedException
|
||||
SessionNotCreatedException, WebDriverException
|
||||
|
||||
def create_selenium_driver(cls,browser='chrome'):
|
||||
# set default browser string based on env (if available)
|
||||
@@ -114,6 +114,9 @@ class Wait(WebDriverWait):
|
||||
pass
|
||||
except StaleElementReferenceException:
|
||||
pass
|
||||
except WebDriverException:
|
||||
# selenium.common.exceptions.WebDriverException: Message: unknown error: unhandled inspector error: {"code":-32000,"message":"Node with given id does not belong to the document"}
|
||||
pass
|
||||
|
||||
time.sleep(self._poll)
|
||||
if time.time() > end_time:
|
||||
|
||||
Reference in New Issue
Block a user