Message ID | 20241011145148.800080-2-richard.purdie@linuxfoundation.org |
---|---|
State | New |
Headers | show |
Series | [1/3] toaster/tests/selenium_helper_base: Handle WebDriverException | expand |
diff --git a/lib/toaster/tests/browser/selenium_helpers_base.py b/lib/toaster/tests/browser/selenium_helpers_base.py index 22d4085b24..cc746511c3 100644 --- a/lib/toaster/tests/browser/selenium_helpers_base.py +++ b/lib/toaster/tests/browser/selenium_helpers_base.py @@ -122,6 +122,7 @@ class Wait(WebDriverWait): if time.time() > end_time: break + self._driver.get_screenshot_as_file("/tmp/toaster-failing-screenshot-%s.png" % int(time.time())) raise TimeoutException(message) def until_not(self, method, message=''):
If we fail to have an element display, dump a screenshot into /tmp since debugging these issues is painful and a screenshot can help a lot. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- lib/toaster/tests/browser/selenium_helpers_base.py | 1 + 1 file changed, 1 insertion(+)