diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-10-18 22:33:47 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-10-24 11:24:03 +0100 |
commit | d0c0c00f6cc693a70ba4cb1e0834a1f75a7fef75 (patch) | |
tree | aa5670fac7e8c6a4d77457a98bdfcf8c80728186 /bitbake/lib/toaster/tests/browser/selenium_helpers_base.py | |
parent | 210417d0f434966c75eb2f03985471c504fb42f9 (diff) | |
download | poky-d0c0c00f6cc693a70ba4cb1e0834a1f75a7fef75.tar.gz |
bitbake: toaster/tests/browser/helpers: Add not visible wait function
In some cases we want to wait until some element is not visible.
Add such a function helper.
(Bitbake rev: cede6519d25112037264550126b109903220b58c)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/tests/browser/selenium_helpers_base.py')
-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 5a4a4ef8b4..b664166055 100644 --- a/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py +++ b/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py | |||
@@ -227,6 +227,13 @@ class SeleniumTestCaseBase(unittest.TestCase): | |||
227 | Wait(self.driver, poll=poll).until(is_visible, msg) | 227 | Wait(self.driver, poll=poll).until(is_visible, msg) |
228 | return self.find(selector) | 228 | return self.find(selector) |
229 | 229 | ||
230 | def wait_until_not_visible(self, selector, timeout=Wait._TIMEOUT): | ||
231 | """ Wait until element matching CSS selector is not visible on the page """ | ||
232 | is_visible = lambda driver: self.find(selector).is_displayed() | ||
233 | msg = 'An element matching "%s" should be visible' % selector | ||
234 | Wait(self.driver, timeout=timeout).until_not(is_visible, msg) | ||
235 | return self.find(selector) | ||
236 | |||
230 | def wait_until_clickable(self, selector, poll=1): | 237 | def wait_until_clickable(self, selector, poll=1): |
231 | """ Wait until element matching CSS selector is visible on the page """ | 238 | """ Wait until element matching CSS selector is visible on the page """ |
232 | sel = selector | 239 | sel = selector |