summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/tests/browser/selenium_helpers_base.py')
-rw-r--r--bitbake/lib/toaster/tests/browser/selenium_helpers_base.py14
1 files changed, 3 insertions, 11 deletions
diff --git a/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py b/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
index 45eabaf1ce..82defea0f2 100644
--- a/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
+++ b/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
@@ -234,17 +234,9 @@ class SeleniumTestCaseBase(unittest.TestCase):
234 234
235 def wait_until_clickable(self, selector, timeout=Wait._TIMEOUT): 235 def wait_until_clickable(self, selector, timeout=Wait._TIMEOUT):
236 """ Wait until element matching CSS selector is visible on the page """ 236 """ Wait until element matching CSS selector is visible on the page """
237 sel = selector 237 is_clickable = lambda driver: (self.find(selector).is_displayed() and self.find(selector).is_enabled())
238 if sel.startswith('#'): 238 msg = 'An element matching "%s" should be clickable' % selector
239 sel = selector[1:] 239 Wait(self.driver, timeout=timeout).until(is_clickable, msg)
240 WebDriverWait(
241 self.driver,
242 timeout=timeout,
243 ).until(
244 EC.element_to_be_clickable((By.ID, sel
245 )
246 )
247 )
248 return self.find(selector) 240 return self.find(selector)
249 241
250 def wait_until_focused(self, selector): 242 def wait_until_focused(self, selector):