-
Notifications
You must be signed in to change notification settings - Fork 8
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
On session close, don't close apps that weren't started by the WebDriver #31
Conversation
Tests currently failing.
When a session times out, don't close the app if the session was attached to an existing app using `appTopLevelWindow` or `appTopLevelWindowTitleMatch`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, added a few comments
Is this exposing the same behavior as other drivers, e.g. appium-windows-driver? The specification is not completely clear about what is best, see https://www.w3.org/TR/webdriver2/#dfn-close-the-session |
Hmm, as far as I remember, WinAppDriver doesn't have a "close app on timeout" feature; I don't know if Edit: I have the "timeout" part in my head because that's where I kept encountering this - I'd stop a test that I was debugging mid-run, the session would time out and the process I was debugging would exit. But it's not just on timeout that the app is being closed, it's when the session ends in general, so ignore the timeout part above ;) |
Just checked |
When a session finishes or times out, don't close the app if the session was attached to an existing app using
appTopLevelWindow
orappTopLevelWindowTitleMatch
.This feels like intuitive behavior to me: the app was running before the session started so one can assume that the user is in control of the app lifetime.
Added a commit with failing tests, and a commit with a simple fix.