mirror of
https://git.yoctoproject.org/poky
synced 2026-04-29 18:32:20 +02:00
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>
This commit is contained in:
@@ -230,12 +230,15 @@ class SeleniumTestCaseBase(unittest.TestCase):
|
||||
|
||||
def wait_until_clickable(self, selector, poll=1):
|
||||
""" Wait until element matching CSS selector is visible on the page """
|
||||
sel = selector
|
||||
if sel.startswith('#'):
|
||||
sel = selector[1:]
|
||||
WebDriverWait(
|
||||
self.driver,
|
||||
Wait._TIMEOUT,
|
||||
poll_frequency=poll
|
||||
).until(
|
||||
EC.element_to_be_clickable((By.ID, selector.removeprefix('#')
|
||||
EC.element_to_be_clickable((By.ID, sel
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user