diff options
author | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-09-11 16:33:29 +0200 |
---|---|---|
committer | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-09-11 16:33:29 +0200 |
commit | 641114a140713fdf75174518b8fae5e0146499cd (patch) | |
tree | 42ed8f0e8b4b6bccf4b2dcb09c32c2e3bdb9c8f6 /service/test/functional | |
parent | 39bbe79b8667fcb98d1080c2fd3392ec4900c53b (diff) |
Wait for click handler to become available
- Issue #456
Diffstat (limited to 'service/test/functional')
-rw-r--r-- | service/test/functional/features/steps/tag_list.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/service/test/functional/features/steps/tag_list.py b/service/test/functional/features/steps/tag_list.py index a715dc67..6bf50d6d 100644 --- a/service/test/functional/features/steps/tag_list.py +++ b/service/test/functional/features/steps/tag_list.py @@ -33,7 +33,7 @@ def expand_side_nav(context): toggle = find_element_by_class_name(context, 'side-nav-toggle') toggle.click() - context.browser.execute_script('true') # execute something so that page hopefully is rendered + wait_for_browser_javascript_execution(context) @when('I select the tag \'{tag}\'') @@ -43,11 +43,18 @@ def impl(context, tag): wait_until_element_is_visible_by_locator(context, (By.ID, 'tag-%s' % tag), timeout=20) + wait_for_browser_javascript_execution(context) + e = find_element_by_id(context, 'tag-%s' % tag) e.click() + wait_until_element_is_visible_by_locator(context, (By.CSS_SELECTOR, "#mail-list li span a[href*='%s']" % tag), timeout=20) +def wait_for_browser_javascript_execution(context): + context.browser.execute_script('true') # execute something so that page hopefully is rendered + + @when('I am in \'{tag}\'') def impl(context, tag): expand_side_nav(context) |