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.

  1. Use explicit context when referencing input fields Always specify the target field clearly to avoid ambiguity.

    Example: Type "cake" in the search bar

    1. This improves accuracy and ensures the text is entered into the intended field.

  2. 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

  3. 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.

    1. Type "Bangalore" in the city field

    2. Type "560001" in the PIN code field

  4. 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.

  5. 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.

    1. Wait until "Search Bar"

    2. Type "Protein Bar"

  6. 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.

    1. If the field contains “Cake”, typing “Chocolate Cake” will override the original value, not append or modify it.

  7. Handle OTP fields based on app design

    1. If the OTP field is a single consolidated field, use:

      1. Type "123456" in the OTP field

    2. If the OTP is split across multiple fields, write explicit step-by-step entries:

      1. Type "1" in the first digit field

      2. Type "2" in the second digit field and so on.

Last updated

Was this helpful?