summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2024-10-11 16:39:33 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-10-14 21:44:38 +0100
commit7637bd0b9c2d8016051629e96fb526dd6fa76e54 (patch)
tree6be6e2d3241148c750442e29d28b46c4f49a4f18 /bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
parente04cd8349eb44f140c904ddcbc9bb1c3e3185165 (diff)
downloadpoky-7637bd0b9c2d8016051629e96fb526dd6fa76e54.tar.gz
bitbake: tests/browser: Avoid python 3.9 syntax
Python 3.9 isn't our minimum version yet, avoid using removeprefix. (Bitbake rev: 8cb9eb6a4f1be4620fcde347faa5c1fb6d77bf70) 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.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py b/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
index 22d4085b24..2725f13382 100644
--- a/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
+++ b/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
@@ -230,12 +230,15 @@ class SeleniumTestCaseBase(unittest.TestCase):
230 230
231 def wait_until_clickable(self, selector, poll=1): 231 def wait_until_clickable(self, selector, poll=1):
232 """ Wait until element matching CSS selector is visible on the page """ 232 """ Wait until element matching CSS selector is visible on the page """
233 sel = selector
234 if sel.startswith('#'):
235 sel = selector[1:]
233 WebDriverWait( 236 WebDriverWait(
234 self.driver, 237 self.driver,
235 Wait._TIMEOUT, 238 Wait._TIMEOUT,
236 poll_frequency=poll 239 poll_frequency=poll
237 ).until( 240 ).until(
238 EC.element_to_be_clickable((By.ID, selector.removeprefix('#') 241 EC.element_to_be_clickable((By.ID, sel
239 ) 242 )
240 ) 243 )
241 ) 244 )