Skip to content

Latest commit

 

History

History
79 lines (56 loc) · 2.27 KB

File metadata and controls

79 lines (56 loc) · 2.27 KB

Back to overview

Hover

The Hover class is an action class in the Screenplay pattern designed for use with the @testla/screenplay library. This class enables actors to simulate hovering over an element specified by a selector string 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 simulates hovering over it.
  • Parameters:
    • actor - The actor performing this action.
  • Returns: Promise<void> - Returns when hovered over the element.

over

public static over(selector: Selector, options?: SelectorOptions & { modifiers?: ('Alt' | 'Control' | 'Meta' | 'Shift')[] }): Hover;
  • Description: Creates a new instance of the Hover class specifically for hovering over an element.
  • Parameters:
    • selector - The selector that should be hovered over.
    • options (optional) - Advanced selector lookup options + Modifier keys to press. Ensures that only these modifiers are pressed during the operation.
  • Returns: Hover - Returns a new Hover instance.

inFrame

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

withAbilityAlias

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

orSkipOnFail

Introduced in: 1.6.0

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

Back to overview