aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/steps/addressbook_steps.py17
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