diff options
author | Vadim Rutkovsky <vrutkovs@redhat.com> | 2014-06-11 19:01:18 +0800 |
---|---|---|
committer | Vadim Rutkovsky <vrutkovs@redhat.com> | 2014-06-11 19:01:35 +0800 |
commit | 0e7041e60629f31e1c72210d7b59c4437d17a292 (patch) | |
tree | ce7f1e43778b297378b77d7c4bd213194af4ec9d | |
parent | 6576094f7e7ee1910c1e57d689dc38abe2813e6e (diff) | |
download | gsoc2013-evolution-0e7041e60629f31e1c72210d7b59c4437d17a292.tar gsoc2013-evolution-0e7041e60629f31e1c72210d7b59c4437d17a292.tar.gz gsoc2013-evolution-0e7041e60629f31e1c72210d7b59c4437d17a292.tar.bz2 gsoc2013-evolution-0e7041e60629f31e1c72210d7b59c4437d17a292.tar.lz gsoc2013-evolution-0e7041e60629f31e1c72210d7b59c4437d17a292.tar.xz gsoc2013-evolution-0e7041e60629f31e1c72210d7b59c4437d17a292.tar.zst gsoc2013-evolution-0e7041e60629f31e1c72210d7b59c4437d17a292.zip |
tests: correctly detect if contact editor section needs expanding
-rw-r--r-- | tests/steps/addressbook_steps.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/steps/addressbook_steps.py b/tests/steps/addressbook_steps.py index 64bfc5a673..00198286af 100644 --- a/tests/steps/addressbook_steps.py +++ b/tests/steps/addressbook_steps.py @@ -237,16 +237,7 @@ def get_combobox_textbox_object(contact_editor, section, scroll_to_bottom=True): panel = lbl.findAncestor(GenericPredicate(roleName='panel')) textboxes = panel.findChildren(GenericPredicate(roleName='text')) - # Expand section if button exists - button = panel.findChild( - GenericPredicate(roleName='push button', name=section), - retry=False, requireResult=False) - # Expand button if any of textboxes is not visible - if button and (False in [x.showing for x in textboxes]): - button.click() - # Scroll to the bottom of the page if needed - pagetab = panel.findAncestor(GenericPredicate(roleName='page tab')) for scroll in pagetab.findChildren(lambda x: x.roleName == 'scroll bar'): if scroll_to_bottom: @@ -254,6 +245,14 @@ def get_combobox_textbox_object(contact_editor, section, scroll_to_bottom=True): else: scroll.value = 0 + # Expand section if button exists + button = panel.findChild( + GenericPredicate(roleName='push button', name=section), + retry=False, requireResult=False) + # Expand button if any of textboxes is not visible + if button and (False in [x.showing for x in textboxes]): + button.click() + comboboxes = panel.findChildren(GenericPredicate(roleName='combo box')) # Rearrange comboboxes and textboxes according to their position |