Touch

Touch

Simulate a touch or click interaction in your automated test

Automated tests are designed to mimic how real users interact with your application. One of the most basic yet essential interactions is a touch or click on an element. Whether users are tapping buttons, selecting links, or interacting with menus, the Touch step lets your test perform these actions reliably across desktop and mobile contexts.

This step replicates the physical gesture of a user’s click or tap, ensuring that your automation interacts with elements exactly as a real person would.

Why touch interactions matter

User interfaces depend on interaction, not observation. Clicking a button, tapping a link, or selecting a UI element often triggers navigation, updates data, opens menus, or reveals additional content.

With the Touch step, you can:

  • Trigger navigation to new pages

  • Activate buttons and links

  • Open dropdowns and menus

  • Interact with form controls

  • Simulate mobile taps

This allows your tests to cover real user behaviour rather than simply validating static page content.

Realistic interaction across device types

Unlike simple event triggers that fire hidden DOM events, the Touch step reflects actual interaction:

  • On desktop, it behaves like a real mouse click

  • On mobile emulations, it behaves like a tap

  • It respects element visibility and clickability

  • It waits for the element to be present before interaction

This results in more reliable and user-aligned automation, reducing flakiness in flows that depend on UI actions.

How this integrates with flows

Touch is usually used in sequences where an action leads to a change in state or content. Common examples include:

  • Clicking a “Sign in” button after filling credentials

  • Tapping a product thumbnail to open details

  • Interacting with navigation items in a header

  • Selecting a link that opens in the same or new tab

  • Triggering UI behaviour like dropdown toggles

Because the step mimics actual gestures, you get behaviour that’s consistent with what real users experience.

Works seamlessly with mobile and responsive flows

Across responsive and mobile testing, Touch works in both contexts:

  • On iPhone and Android form factors

  • In desktop Chrome, Firefox, or Edge layouts

  • Inside modals, overlays, and interactive components

This means your test can confidently assert behaviour no matter the environment.

Combine with assertions and downstream checks

Touch is often followed by validation steps such as:

  • Check Text

  • Check Value

  • Wait for navigation

  • Wait for element

  • Run Browser Script

  • Visual regression snapshots

This lets you construct complete interaction chains that verify both action and outcome.

For example:

  • Touch a “Submit” button

  • Wait for the next page to load

  • Assert that success text appears

  • Check that specific values are displayed

This gives you comprehensive coverage of interactive behaviour.

Make your tests more human

By simulating real clicks and taps, your automation feels more like real user behaviour. This improves reliability, reduces false positives, and makes your test results more trustworthy for developers, testers, and stakeholders alike.

When your automation interacts like a user would, you gain confidence that your application works the way it should in the real world.