Skip to content

Latest commit

 

History

History
79 lines (56 loc) · 2.05 KB

File metadata and controls

79 lines (56 loc) · 2.05 KB

Back to overview

Count

The Count class is an action class in the Screenplay pattern designed for use with the @testla/screenplay library. This class enables actors to count screen elements for a given selector using the BrowseTheWeb ability provided by Testla.

Table of Contents

Class Overview

Methods

performAs

public async performAs(actor: Actor): Promise<any>;
  • Description: Counts screen elements which can be found via a selector.
  • Parameters:
    • actor - The actor performing this action.
  • Returns: Promise<number> - Returns the count of found elements.

page

public static page(): Count;
  • Description: Creates a new instance of the Count class specifically for counting elements which satisfy a selector lookup.
  • Parameters:
    • selector - The Selector.
    • options (optional) - Advanced selector lookup options.
  • Returns: Count - Returns a new Count instance.

inFrame

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

withAbilityAlias

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

orSkipOnFail

Introduced in: 1.6.0

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

Back to overview