diff options
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') |