Keyboard does NOT close by any action after beeing opened by autofocus on inputfield widget. #2178
Unanswered
stoyanov91
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Patrol version: 3.6.1
patrol_cli version: 2.7.0
Device: Android 13.0 Pixel XL API 33
We have a widget with autofocus on the input field, which causes the keyboard to appear.
The normal flow would be that the keyboard hides after clicking a "Save" button.
Unfortunately when the test clicks "Save" the keyboard stays on the screen and hides other
widgets underneath it. We tried $.native.tap() on some elements on the screen, but that did
not hide the keyboard.
Update:
Tried also this approach:
Future<void> nativeEnterText(var widget, String inputText) async { await $(widget).tap(): await checkWidgetVisibility(widget); await $.native.enterText(Selector(focused: true), text: inputText, keyboardBehavior: KeyboardBehavior.showAndDismiss); }
This works fine for positive cases, but fails to enter the text when there are multiple invalid inputs
for that field and a final step with valid input that is accepted.
Beta Was this translation helpful? Give feedback.
All reactions