Skip to content

Click Steps

Source: src/tests/steps/actions/click.step.ts.

See shared placeholder rules in Step Parameter Conventions.

Signature: the user clicks on the {string} element

What it does:

  • Resolves locator by name.
  • Performs a standard Playwright click.

Parameters:

ParameterRepresentsExpected data
{string}Target locator nameExisting locator key (for example loginButton).

Example:

When the user clicks on the "loginButton" element

Signature: the user double clicks on the {string} element

What it does:

  • Resolves locator by name.
  • Performs dblclick() on the matched element.

Parameters:

ParameterRepresentsExpected data
{string}Target locator nameExisting locator key (for example rowItem).

Example:

When the user double clicks on the "rowItem" element

Signature: the user right clicks on the {string} element

What it does:

  • Resolves locator by name.
  • Performs click({ button: 'right' }).

Parameters:

ParameterRepresentsExpected data
{string}Target locator nameExisting locator key (for example contextMenuTarget).

Example:

When the user right clicks on the "contextMenuTarget" element
  • Step fails if locator cannot be resolved.
  • Step fails if element is not interactable in current page state.