Best Practices for Tap Command
This section defines the recommended practices for writing stable and unambiguous tap commands in Drizz. Because tapping is one of the most frequently used interactions in mobile automation, clarity and precision in describing the intended UI target are essential for consistent execution. These guidelines help ensure that tap commands resolve accurately across different layouts, repeated elements, dynamic screens and scenarios where text labels or icons may vary. By following these practices, authors can significantly improve reliability, reduce ambiguity, and create tests that behave deterministically across devices and OS versions.
Recommended Best Practices for Writing Tap Commands:
Use exact text when available Write the target clearly with precision.
Example: Tap ADD
Prefer exact matches over descriptive phrases.
Use positional referencing when multiple identical labels exist
Example: Tap the first "ADD"
Example: Tap on "Continue" at the bottom of the page
Always specify direction to avoid ambiguity.
Use contextual referencing when the same text appears across sections
Example: Tap "Apply" in coupon section
Example: Tap "Edit" under Profile
Example: Tap on "Blue icon" under Profile
Helps Drizz reliably identify the correct instance.
Use icon/colour references when the element has no text
Example: Tap the search icon
Example: Tap ton the red button
Use icon or colour based terms only when no text label is associated.
Avoid phrase-based descriptions when text labels exist
Prefer: Tap Login
Not preferred: Tap the login button on the lower half of the page
Always validate after a critical tap
Example:
Type username as xyz@123 Type password as pass@123 Tap on login CTA Validate Homepage is visible
Last updated
Was this helpful?