Skip to content

Latest commit

 

History

History
79 lines (56 loc) · 2.12 KB

File metadata and controls

79 lines (56 loc) · 2.12 KB

Back to overview

Click

The Click class is an action class in the Screenplay pattern designed for use with the @testla/screenplay library. This class allows actors to click on an element specified by a selector using the BrowseTheWeb ability provided by Testla.

Table of Contents

Class Overview

Methods

performAs

public async performAs(actor: Actor): Promise<void>;
  • Description: Finds the specified selector and clicks on it using the BrowseTheWeb ability.
  • Parameters:
    • actor - The actor performing this action.
  • Returns: Promise<void> - Returns a promise that resolves after clicking the element.

on

public static on(selector: Selector, options?: SelectorOptions): Click;
  • Description: Creates a new instance of the Click class specifically for clicking on an element specified by a selector.
  • Parameters:
    • selector - The Selector.
    • options (optional) - Advanced selector lookup options.
  • Returns: Click - Returns a new Click instance.

inFrame

public inFrame(frameSelector: FrameSelector): Click;
  • Description: Finds the specified frame selector using the BrowseTheWeb ability.
  • Parameters:
    • frameSelector - The FrameSelector.
  • Returns: Click - Returns the current action.

withAbilityAlias

public withAbilityAlias(alias: string): Click;
  • Description: Defines the ability alias to be used during execution.
  • Parameters:
    • alias - The alias.
  • Returns: Click - Returns the current action.

orSkipOnFail

Introduced in: 1.6.0

public get orSkipOnFail(): Click;
  • Description: Allows to skip an action on fail.
  • Returns: Click - Returns the current action.

Back to overview