Set input

Set input

Set the value of an input or form field in your automated test

Entering data is one of the most fundamental parts of user interaction. When users fill out forms, search boxes, or configuration fields, they are setting values that determine how the application behaves next. The Set Input step lets your test assign a specific value directly into an input or form element, just like a real user typing or choosing a value.

This makes your automation precise, predictable, and reflective of actual user behaviour.

Why setting input values matters

User journeys often depend on the values entered into fields. For example:

  • Logging in with an email or username

  • Entering a password

  • Searching for products

  • Filling in shipping or billing information

  • Choosing dates or quantities

  • Adding profile or account data

If your automation cannot reliably set these values, it cannot test critical paths effectively.

With Set Input, your test places text or numbers into the target field exactly as specified, laying the foundation for the next steps in your flow.

How the step works

The Set Input step:

  1. Targets an input or form field using its selector

  2. Assigns a specific value to that field

  3. Ensures the value appears in the element as expected

  4. Continues the flow once the field is populated

This gives your automation clarity and control over what data is fed into the application.

For example:

  • Set a user email in a login form

  • Input a search term and submit

  • Provide a promo code at checkout

  • Fill address or contact fields

  • Update profile information

Each of these scenarios depends on precise value assignment for the test to proceed.

Works with dynamic and stored values

Values inside your tests can come from many sources. DoesQA lets you work with:

  • Static values defined by your test

  • Dynamic values generated during the run

  • Stored values from previous steps

  • Extracted values from API calls or email content

This means your automation can adapt to real data and use it in subsequent steps. For instance:

  • Extract a code from an email

  • Store it

  • Set input with the extracted value

  • Continue the flow based on that input

This makes tests flexible and context aware.

Combine with other actions

Setting input values is usually part of a sequence. After a field is populated, you can continue with:

  • Touch to submit or interact

  • Check Value to verify the input was set correctly

  • Wait for Element to synchronise with UI changes

  • Check Text to validate confirmation messages

  • Select Option to choose related controls

This lets your tests model true user behaviour from data entry to result assertion.

Reliable form interaction

Unlike direct DOM manipulation or script hacks, the Set Input step interacts with fields in a way that reflects real user input. This ensures that:

  • Event listeners trigger as expected

  • Validation logic runs

  • Reactive UI updates occur

  • Autofill behaviours are consistent

By modelling true user interaction, your test suite captures realistic behaviours and avoids brittle workarounds.

Improve confidence in data-driven workflows

Many critical flows depend on user input. By automating value setting clearly and explicitly:

  • You reduce maintenance overhead

  • You increase readability of your automation

  • You make your tests more resilient to UI changes

This makes your test pack stronger and your validation deeper, giving you confidence that your application responds correctly to real user data interactions.