diff options
Diffstat (limited to 'bitbake/lib/toaster/tests')
| -rw-r--r-- | bitbake/lib/toaster/tests/browser/selenium_helpers_base.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py b/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py index 82defea0f2..4eea2267cc 100644 --- a/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py +++ b/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py | |||
| @@ -239,6 +239,13 @@ class SeleniumTestCaseBase(unittest.TestCase): | |||
| 239 | Wait(self.driver, timeout=timeout).until(is_clickable, msg) | 239 | Wait(self.driver, timeout=timeout).until(is_clickable, msg) |
| 240 | return self.find(selector) | 240 | return self.find(selector) |
| 241 | 241 | ||
| 242 | def wait_until_element_clickable(self, finder, timeout=Wait._TIMEOUT): | ||
| 243 | """ Wait until element is clickable """ | ||
| 244 | is_clickable = lambda driver: (finder(driver).is_displayed() and finder(driver).is_enabled()) | ||
| 245 | msg = 'A matching element never became be clickable' | ||
| 246 | Wait(self.driver, timeout=timeout).until(is_clickable, msg) | ||
| 247 | return finder(self.driver) | ||
| 248 | |||
| 242 | def wait_until_focused(self, selector): | 249 | def wait_until_focused(self, selector): |
| 243 | """ Wait until element matching CSS selector has focus """ | 250 | """ Wait until element matching CSS selector has focus """ |
| 244 | is_focused = \ | 251 | is_focused = \ |
