From fdb847f6a5f0d17937316df4a08acea1ee7bf6c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carles=20Barrobe=CC=81s?= Date: Wed, 20 Jul 2016 10:46:06 +0200 Subject: [PATCH] Fix set_dropdown_value for Chrome. On Chrome, element.text doesn't trim surrounding whitespace. Hence, matching a dropdown option that contained leading or trailing whitespace didn't work --- src/sst/__init__.py | 2 +- src/sst/actions.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sst/__init__.py b/src/sst/__init__.py index b719628..e8de868 100644 --- a/src/sst/__init__.py +++ b/src/sst/__init__.py @@ -18,7 +18,7 @@ # -__version__ = '0.2.8dev-3' +__version__ = '0.2.8dev-4' DEVSERVER_PORT = 8120 # django devserver for internal acceptance tests diff --git a/src/sst/actions.py b/src/sst/actions.py index 8906c0a..6cd3e61 100644 --- a/src/sst/actions.py +++ b/src/sst/actions.py @@ -961,7 +961,7 @@ def set_dropdown_value(id_or_elem, text=None, value=None): text or value)) if text and not value: for element in elem.find_elements_by_tag_name('option'): - if element.text == text: + if element.text.strip() == text: element.click() return msg = 'The following option could not be found in the list: %r' % text