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
mobileDriver.currentWindow should not return hidden windows, fixes #1835 #1986
Conversation
} | ||
} | ||
|
||
return last |
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.
This code will return the last hidden window if they are all hidden - is that intended?
Above we return nil if there are no windows, I think we should do that here too
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.
This code will return the last hidden window if they are all hidden - is that intended?
Yes, that was intended.
Above we return nil if there are no windows, I think we should do that here too
That was something that I was not sure. In mobile, if all the windows are hidden, what does it mean? 🤔
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.
It should not be done - app will be unusable. But not sure that the most recently added window is the right response in this situation... It should never happen, but there is specifically code in their to accommodate it so I figured we should be sure that is what should occur if it can.
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.
But not sure that the most recently added window is the right response in this situation...
Indeed this change is returning the parent window (not the most recently added) because I am looping in reverse. Now I realized I have misread your first comment. It is not the last hidden window but the first one (parent one).
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.
Oh yes I see, sorry for misreading the first time
Looks good to me, as the original reporter @Jacalz could you please test this as well? |
Misread the loop order. Question is open, but not a blocker now
Description:
Fixes #1835
Checklist: