Skip to content

Latest commit

 

History

History
47 lines (34 loc) · 1.68 KB

File metadata and controls

47 lines (34 loc) · 1.68 KB

Back to overview

DragAndDrop

The DragAndDrop class is an action class in the Screenplay pattern designed for use with the @testla/screenplay library. This class allows actors to drag an element specified by a source selector and drop it on an element specified by a target selector using the BrowseTheWeb ability provided by Testla.

Table of Contents

Class Overview

Methods

performAs

public performAs(actor: Actor): Promise<void>;
  • Description: Drags the specified source element and drops it on the target element using the BrowseTheWeb ability.
  • Parameters:
    • actor - The actor performing this action.
  • Returns: Promise<void> - Returns a promise that resolves after dragging the locator to another target locator or target position.

execute

public static execute(sourceSelector: Selector, targetSelector: Selector, options?: {
    source?: SelectorOptions;
    target?: SelectorOptions;
}): DragAndDrop;
  • Description: Creates a new instance of the DragAndDrop class specifically for dragging the specified source element and dropping it on the specified target element.
  • Parameters:
    • sourceSelector - The selector of the source element.
    • targetSelector - The selector of the target element.
    • options (optional) - Advanced selector lookup options.
  • Returns: DragAndDrop - Returns a new DragAndDrop instance.

Back to overview