summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
diff options
context:
space:
mode:
authorAlassane Yattara <alassane.yattara@savoirfairelinux.com>2024-01-09 14:54:06 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-01-10 13:55:33 +0000
commit49ccf2f5e01cc98c25424b8d9326b4eaf6c8bdd7 (patch)
tree81f08cb1e1d439375f04457f712cbc15a313d13b /bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
parent0d93308425fd1e668dc43bcfe4b282289a30506a (diff)
downloadpoky-49ccf2f5e01cc98c25424b8d9326b4eaf6c8bdd7.tar.gz
bitbake: toaster/tests: Setup delay after driver action self.get(url)
Recurring test failures result from insufficient delays in driver actions. (Bitbake rev: b0de2a61d14fbf30e338751b285b3bab80192275) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> 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.py7
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 562fedec8c..393be75496 100644
--- a/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
+++ b/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
@@ -182,6 +182,13 @@ class SeleniumTestCaseBase(unittest.TestCase):
182 abs_url = '%s%s' % (self.live_server_url, url) 182 abs_url = '%s%s' % (self.live_server_url, url)
183 self.driver.get(abs_url) 183 self.driver.get(abs_url)
184 184
185 try: # Ensure page is loaded before proceeding
186 self.wait_until_visible("#global-nav", poll=3)
187 except NoSuchElementException:
188 self.driver.implicitly_wait(3)
189 except TimeoutException:
190 self.driver.implicitly_wait(3)
191
185 def find(self, selector): 192 def find(self, selector):
186 """ Find single element by CSS selector """ 193 """ Find single element by CSS selector """
187 return self.driver.find_element(By.CSS_SELECTOR, selector) 194 return self.driver.find_element(By.CSS_SELECTOR, selector)