From cf9cc7f7ca0cf882056d8dff506f2c1edf824bfe Mon Sep 17 00:00:00 2001 From: Folker Bernitt Date: Fri, 11 Sep 2015 17:22:02 +0200 Subject: Another attempt to make side nav more reliable - Issue #456 - Also added action chain for search --- service/test/functional/features/steps/search.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'service/test/functional/features/steps/search.py') 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 . 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') -- cgit v1.2.3