diff options
Diffstat (limited to 'service/test/functional/features/steps/search.py')
-rw-r--r-- | service/test/functional/features/steps/search.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/service/test/functional/features/steps/search.py b/service/test/functional/features/steps/search.py index e653c3ed..879e834d 100644 --- a/service/test/functional/features/steps/search.py +++ b/service/test/functional/features/steps/search.py @@ -13,7 +13,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,9 +22,10 @@ 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) - sleep(1) + 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') |