Best Practices for Type Command
Typing actions directly influence user inputs, search queries, form fields, and authentication flows. To maintain accuracy and reliability, Drizz requires clear contextual targeting for every text-entry operation. Following these best practices ensures that typed values always land in the correct field, even on complex or dynamic screens.
Recommended Best Practices for Writing Type Commands:
Use explicit context when referencing input fields Always specify the target field clearly to avoid ambiguity.
Example: Type "cake" in the search bar
This improves accuracy and ensures the text is entered into the intended field.
Use field labels or placeholders when multiple similar inputs exist When identical or similar fields appear, refer to them using their visible label, placeholder, or section header.
Example: Type "John" in the first name field Type "Doe" in the last name field
Explicitly mention the input field when filling multi-field forms For screens that contain several input fields (profile forms, checkout forms, address forms), always specify the exact field for each entry.
Type "Bangalore" in the city field
Type "560001" in the PIN code field
Avoid generic type commands when multiple fields are present Commands like type "John" without context may result in incorrect focus and unstable test behavior. Always provide the additional context needed to identify the correct input.
Account for dynamic UI load times before typing Avoid typing during transitions, animations or dynamic loading of the input field. Use a wait or validation before typing.
Wait until "Search Bar"
Type "Protein Bar"
Understand input replacement behavior Selectively replacing part of a sentence or inline editing is not supported. Drizz will replace the entire existing text with the new value.
If the field contains “Cake”, typing “Chocolate Cake” will override the original value, not append or modify it.
Handle OTP fields based on app design
If the OTP field is a single consolidated field, use:
Type "123456" in the OTP field
If the OTP is split across multiple fields, write explicit step-by-step entries:
Type "1" in the first digit field
Type "2" in the second digit field and so on.
Last updated
Was this helpful?