close keyboard before taking the screenshot - #9
Conversation
There was a problem hiding this comment.
I proposed doing this first in our app and test it well before considering moving it to the lib, but ok 😄 Thanks!
P.S.: Also, this is not the only way it can be done, the lib could provide this as an extension function... idk. I'm OK with this one.
I've tested it locally before and it seems to close the keyboard properly. |
|
I don't have a strong opinion, but I think this is very specific and shouldn't be inside the library. You can always use that I would understand adding this if the code to close the keyboard was complex and difficult, but in this case, it's just calling an espresso function. |
I don't have a strong opinion on this either, which is why I opened this PR to start a debate. Its' true that is not complex code, and It's also true that you'll often want to close the keyboard by simulating an “Enter” key press, and we can't handle that with this. Perhaps it's better to leave it for implementation in the apps rather than the library. |
🎟️ Jira ticket
ANDROID-16401
🥅 What's the goal?
In the last SmartWifi PR @jeprubio has proposed to add a property to close the keyboard before the screenshot inside the snaptesting library instead of in the app. I'm adding this feature, is that okay with you?
🚧 How do we do it?
Just one variable with default value as false that forces the keyboard to close.