tapOn
Last updated
Was this helpful?
Last updated
Was this helpful?
Taps on an element using a .
Tap on text
Tap on an element with ID
Tap on a point in the top left corner of the screen
Tap on a point in the center of the screen
If you need to tap multiple times, make use of the repeat
option:
By default, taps will occur 100 milliseconds apart; you can change this using the delay
option:
If the test runner does not detect a view change after an tapOn
command, then it will automatically tap again.
On Android, this sometimes manifests as a double tap which can cause issues in your test steps.
You can disable this behaviour by setting the retryTapIfNoChange
option to false
:
By default, the runner will dynamically wait for any animations to finish before executing a command. This ensures that the screen is stable, and any content is loaded, before proceeding. The argument waitToSettleTimeoutMs
will force override the wait after a configured number of milliseconds.
However, in some cases, this might be undesirable behaviour such as with animation-heavy apps.
Note: for a double tap, you may prefer the command