aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVadim Rutkovsky <vrutkovs@redhat.com>2014-05-11 18:10:57 +0800
committerVadim Rutkovsky <vrutkovs@redhat.com>2014-05-11 23:47:45 +0800
commit4508696844c20530bdf7fe6150c432eb16a9c77b (patch)
treeeb0b28bb0211af0d11f82e0060d3272ddaf07d8b /tests
parentaebc1d5b6fe8cec40a30787591a989a5be6baba5 (diff)
downloadgsoc2013-evolution-4508696844c20530bdf7fe6150c432eb16a9c77b.tar
gsoc2013-evolution-4508696844c20530bdf7fe6150c432eb16a9c77b.tar.gz
gsoc2013-evolution-4508696844c20530bdf7fe6150c432eb16a9c77b.tar.bz2
gsoc2013-evolution-4508696844c20530bdf7fe6150c432eb16a9c77b.tar.lz
gsoc2013-evolution-4508696844c20530bdf7fe6150c432eb16a9c77b.tar.xz
gsoc2013-evolution-4508696844c20530bdf7fe6150c432eb16a9c77b.tar.zst
gsoc2013-evolution-4508696844c20530bdf7fe6150c432eb16a9c77b.zip
tests: correctly search for combobox-textbox pair
Diffstat (limited to 'tests')
-rw-r--r--tests/steps/addressbook_steps.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/steps/addressbook_steps.py b/tests/steps/addressbook_steps.py
index 97c2c72d95..37dda44e68 100644
--- a/tests/steps/addressbook_steps.py
+++ b/tests/steps/addressbook_steps.py
@@ -258,9 +258,10 @@ def get_combobox_textbox_object(contact_editor, section):
combo_row = combo.position[1]
matching_textboxes = [
x for x in textboxes
- if (x.position[1] == combo_row) and (x.position[0] > combo.position[0])]
- correct_textbox = min(matching_textboxes, key=lambda x: x.position[0])
- result.append((combo, correct_textbox))
+ if (x.position[1] - combo_row < 10) and (x.position[0] > combo.position[0])]
+ if (matching_textboxes != []):
+ correct_textbox = min(matching_textboxes, key=lambda x: x.position[0])
+ result.append((combo, correct_textbox))
comboboxes = [x[0] for x in result][::-1]
textboxes = [x[1] for x in result][::-1]