Best Practices for the Validate Command
The Validate command ensures the correctness of UI states, text, screen elements, and computed values during execution. To achieve consistent and reliable validations across dynamic mobile interfaces, Drizz follows a set of best practices that help uniquely identify elements, avoid ambiguity in repeated layouts, and accurately verify calculated or context-dependent values. These practices guide users to provide clear intent, precise context, and structured references, enabling Drizz’s Vision AI and Mathematical MCP to perform deterministic, high-confidence validations across all platforms.
Recommended Best Practices for Writing Validate Commands:
Use complete and exact text whenever possible Always validate the full visible label to avoid ambiguity. Correct: Validate Order Placed is visible Avoid: Validate Placed is visible
Provide contextual references when the label appears multiple times Use section, header or nearby element context to uniquely identify the target. Example: Validate Apply CTA is visible in coupon section
Use positional indicators for repeated UI elements When identical labels appear, specify position. Example: Validate the first "Add" CTA
Use container or grouping context for structured layouts Ideal for cards, product lists, pricing sections or rows. Example: Validate Select is enabled inside delivery options
Avoid partial matches unless the label is dynamic Prefer full-text validation except for dynamic states like loading messages or generated labels. Example: Validate text contains "Success"
Be explicit when validating computed values or totals Clearly describe the calculation so Drizz MCP can compute it reliably. Example: Validate that final amount equals subtotal + tax + delivery charges
Group multiple calculations into a single validation when they belong together Ensures atomic evaluation and consistent results. Example: Validate the following calculations 1. Subtotal + Tax = Total 2. Total – Discount = Final Amount
Use contextual validation for neighboring values For price tags, labels or badges linked to another item, reference the associated element. Example: Validate ₹499 next to MRP is present
Validate only after UI stability Avoid validating during animations, transitions or loading states. Drizz performs up to three intelligent attempts.
When validating dynamic fields, specify the stable part of the text Focus on the consistent prefix, suffix or key phrase. Example: Validate text starts with "Order"
For URL validations, be explicit Use exact match for final URLs and “contains” for route checks. Example: Validate URL contains "/checkout"
Avoid validating similar items without disambiguation Always give Drizz enough context to uniquely locate the target.
Last updated
Was this helpful?