diff options
author | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-09-11 17:22:02 +0200 |
---|---|---|
committer | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-09-11 17:22:02 +0200 |
commit | cf9cc7f7ca0cf882056d8dff506f2c1edf824bfe (patch) | |
tree | e7508cc457d0e4de13b5ecf4b8ace9dccffa9f2d /service/test/functional/features/steps/search.py | |
parent | 641114a140713fdf75174518b8fae5e0146499cd (diff) |
Another attempt to make side nav more reliable
- Issue #456
- Also added action chain for search
Diffstat (limited to 'service/test/functional/features/steps/search.py')
-rw-r--r-- | service/test/functional/features/steps/search.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/service/test/functional/features/steps/search.py b/service/test/functional/features/steps/search.py index 2d9087d2..52cb54a2 100644 --- a/service/test/functional/features/steps/search.py +++ b/service/test/functional/features/steps/search.py @@ -14,6 +14,7 @@ # You should have received a copy of the GNU Affero General Public License # along with Pixelated. If not, see <http://www.gnu.org/licenses/>. from time import sleep +from selenium.webdriver import ActionChains from selenium.webdriver.common.keys import Keys from common import * @@ -22,8 +23,11 @@ from common import * @when('I search for a mail with the words "{search_term}"') def impl(context, search_term): search_field = find_element_by_css_selector(context, '#search-trigger input[type="search"]') - search_field.send_keys(search_term) - search_field.send_keys(Keys.ENTER) + + ActionChains(context.browser)\ + .send_keys_to_element(search_field, search_term)\ + .send_keys_to_element(search_field, Keys.ENTER)\ + .perform() @then('I see one or more mails in the search results') |