mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
bitbake: 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. (Bitbake rev: cea34880ad3847bd0e24c9b650eb816e1757cf2b) 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>
This commit is contained in:
committed by
Richard Purdie
parent
484cbf81cf
commit
e65c9808e9
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user