Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[6.14.z] ui_session: return airgun session as a context manager (#15155)
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) Co-authored-by: Pavel Novotny <[email protected]>
- Loading branch information