Skip to content

[BUG] HideKeyboard #42

@satishs22

Description

@satishs22

Description

hideKeyboard behaves inconsistently across drivers. With uiautomator2, it does nothing — the keyboard stays open. With devicelab, it dismisses the keyboard but also triggers an unintended back navigation gesture, causing the screen to navigate back.

Steps to Reproduce

  1. Run command ./maestro.sh ./.maestro/contacts/contacts-search.yaml
  2. With flow file .maestro/contacts/contacts-search.yaml
  3. See error after hideKeyboard on line 34

Expected Behavior

hideKeyboard dismisses the software keyboard with no side effects. Screen should remain on the current view.

Actual Behavior

  • devicelab: Keyboard is dismissed but an additional back gesture is triggered, navigating away from the current screen.
  • uiautomator2: hideKeyboard is a no-op — keyboard remains visible.

Environment

  • OS: macOS
  • maestro-runner version: latest
  • Executor: devicelab (primary), also reproduced on uiautomator2
  • Device: Android emulator emulator-5554 (system-images;android-34;google_apis;x86_64)

Flow File

- tapOn:
    id: contacts-search-input
- inputText:
    id: contacts-search-input
    text: 'test'
- hideKeyboard   # ← triggers unintended back navigation on devicelab

Error Output

# devicelab: no explicit error, but subsequent assertions fail because the screen navigated back
# uiautomator2: hideKeyboard completes but keyboard remains visible

Additional Context

Workaround: replace hideKeyboard with a tap on a neutral element (e.g. the list or header) to dismiss the keyboard without triggering navigation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions