Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.12.z] ui_session: return airgun session as a context manager #15156

Commits on May 23, 2024

  1. ui_session: return airgun session as a context manager (#15050)

    In `Satellite.ui_session()` context manager method,
    `airgun.session.Session()` is also a context manager
    and needs to be returned using the `with-yield` contruct,
    so the Session's `__enter__` and `__exit__` methods are executed.
    
    This fixes the problem where `Session.__exit__()` method was not called
    and thus screenshot was not taken and the browser window was not closed
    at the end of the test.
    
    Also the `except Exception: raise` part was removed as redundant.
    
    (cherry picked from commit 2618e01)
    pnovotny authored and web-flow committed May 23, 2024
    Configuration menu
    Copy the full SHA
    bb2bf8f View commit details
    Browse the repository at this point in the history