diff options
author | Folker Bernitt <fbernitt@thoughtworks.com> | 2014-10-15 10:39:04 +0200 |
---|---|---|
committer | Folker Bernitt <fbernitt@thoughtworks.com> | 2014-10-16 09:57:28 +0200 |
commit | 693957054255b1807ae9c09478a06e191114b7fb (patch) | |
tree | 5afdbb556dccc69f2727c87a14fbd826a4fcc2ad /service/test/functional/features/steps/common.py | |
parent | b23df828897bb6c0a52804914c35873ea4b09e9d (diff) |
Added some wait until visible to functional tests to make them more stable.
Diffstat (limited to 'service/test/functional/features/steps/common.py')
-rw-r--r-- | service/test/functional/features/steps/common.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/service/test/functional/features/steps/common.py b/service/test/functional/features/steps/common.py index 015c24ef..26d049aa 100644 --- a/service/test/functional/features/steps/common.py +++ b/service/test/functional/features/steps/common.py @@ -34,6 +34,12 @@ def wait_for_user_alert_to_disapear(context): wait_until_element_is_invisible_by_locator(context, (By.ID, 'user-alerts')) +def wait_until_elements_are_visible_by_locator(context, locator_tuple): + wait = WebDriverWait(context.browser, 10) + wait.until(EC.presence_of_all_elements_located(locator_tuple)) + return context.browser.find_elements(locator_tuple[0], locator_tuple[1]) + + def wait_until_element_is_visible_by_locator(context, locator_tuple): wait = WebDriverWait(context.browser, 10) wait.until(EC.visibility_of_element_located(locator_tuple)) |