Skip to content

How to tap on the iOS simulator numeric keypad? #4724

Open
@jzhang015

Description

@jzhang015

Description

Hi,
My react-native mobile app includes some iOS native numeric keyboard in the payment process, I would like to know how can I tap on the numeric keypad?

I tried to locate the key by by.text() or by.label(), for example, locate key 1 by

await element(by.text('1')).tap(); // nothing happened

or

await element(by.label('1')).tap(); // Interestingly, when using by.label('4').tap(); it actually tapped 7, and when using by.label('1').tap(), nothing tapped.

I can't find the reference of the input field either.

Could you kindly help to advise how can I handle this?

Image

Your environment

Detox version: 20.33.0
React Native version: 0.76.8
Node version: 20
Test-runner (select one): jest

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions