Skip to content

Feature/add native send keyboard enter #3044

Open
dworik wants to merge 20 commits into
masterfrom
feature/add-native-sendKeyboardEnter
Open

Feature/add native send keyboard enter #3044
dworik wants to merge 20 commits into
masterfrom
feature/add-native-sendKeyboardEnter

Conversation

@dworik
Copy link
Copy Markdown
Contributor

@dworik dworik commented Apr 30, 2026

Issue #2748

Contents

Implements SendKeyboardEnter() function for mobile platform (currently only android waiting for #3003 to close) that sends Enter action for currently focused input. On android it uses native UiDevice.pressEnter().

Test plan

  • dev/e2e_app/patrol_test/mobile_keyboard_enter_test.dart - tests pressing enter on all available keyboard types on given device.

CI

  • test android emulator webview expected to fail
  • patrol_finders check semver expected to fail

@github-actions github-actions Bot added the package: patrol Related to the patrol package (native automation, test bundling) label Apr 30, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a sendKeyboardEnter method to MobileAutomator to simulate native keyboard enter actions, implemented for Android and stubbed for iOS. It also introduces a new E2E test and a sample screen with multiple text fields. PatrolTester.enterText was updated to unregister testTextInput and clear focus after entry, which is identified as a potential breaking change requiring documentation or configuration. Further feedback includes correcting a typo in the changelog and adding assertions to the new E2E test to verify that the onSubmitted callback is triggered.

Comment thread packages/patrol_finders/lib/src/custom_finders/patrol_tester.dart Outdated
Comment thread packages/patrol/CHANGELOG.md Outdated
Comment thread dev/e2e_app/patrol_test/mobile_keyboard_enter_test.dart
@mateuszwojtczak
Copy link
Copy Markdown
Contributor

Nitpick: I think we prefer to start commit messages with imperative form, e.g. "Fix typo" instead of "Fixed typo". Also we'd start with a capital letter.

@dworik dworik changed the title Feature/add native send keyboard enter #2748 Feature/add native send keyboard enter May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: patrol Related to the patrol package (native automation, test bundling)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants