From e65c9808e9bb85ffd2b668bade4b8a50e470d050 Mon Sep 17 00:00:00 2001 From: Elliot Smith Date: Tue, 19 Apr 2016 17:28:44 +0100 Subject: 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 Signed-off-by: Michael Wood Signed-off-by: Richard Purdie --- bitbake/lib/toaster/tests/browser/selenium_helpers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bitbake') diff --git a/bitbake/lib/toaster/tests/browser/selenium_helpers.py b/bitbake/lib/toaster/tests/browser/selenium_helpers.py index d3ab3ca72e..56dbe2b344 100644 --- a/bitbake/lib/toaster/tests/browser/selenium_helpers.py +++ b/bitbake/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 , for example), so simulate + # user clicking the element before inserting text into it + field = self.click(selector) + field.send_keys(value) return field -- cgit v1.2.3-54-g00ecf