tapOn
Taps on an element using a selector.
Options
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
Repeating Taps
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:
Note: for a double tap, you may prefer the doubleTapOn command
Retry Tap If No Change
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
:
Wait to Settle Timeout
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.
Related Commands
Last updated