diff options
author | Elliot Smith <elliot.smith@intel.com> | 2016-04-19 17:28:44 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-04-19 21:10:58 +0100 |
commit | cea34880ad3847bd0e24c9b650eb816e1757cf2b (patch) | |
tree | cb06700bc47a2651f8229d7a87c5d8c93ead99d0 /lib/toaster | |
parent | 21c1f8f8e30ef868ea6fd861eea1389f149f1049 (diff) | |
download | openembedded-core-contrib-cea34880ad3847bd0e24c9b650eb816e1757cf2b.tar.gz |
toaster-tests: make helper click on input before entering text
The Selenium helper's enter_text() method doesn't cause
keyup events to trigger unless the element where text is
being entered has been clicked.
Prefix all text entry with a click() on the element to ensure
that keyup events fire.
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster')
-rw-r--r-- | lib/toaster/tests/browser/selenium_helpers.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/toaster/tests/browser/selenium_helpers.py b/lib/toaster/tests/browser/selenium_helpers.py index d3ab3ca72e..56dbe2b344 100644 --- a/lib/toaster/tests/browser/selenium_helpers.py +++ b/lib/toaster/tests/browser/selenium_helpers.py @@ -185,7 +185,11 @@ class SeleniumTestCase(StaticLiveServerTestCase): def enter_text(self, selector, value): """ Insert text into element matching selector """ - field = self.wait_until_present(selector) + # note that keyup events don't occur until the element is clicked + # (in the case of <input type="text"...>, for example), so simulate + # user clicking the element before inserting text into it + field = self.click(selector) + field.send_keys(value) return field |