The Check
class is an action class in the Screenplay pattern designed for use with the @testla/screenplay
library. This class allows actors to check a checkbox specified by a selector string using the BrowseTheWeb
ability provided by Testla.
public async performAs(actor: Actor): Promise<void>;
- Description: Finds the specified selector and clicks on the checkbox using the
BrowseTheWeb
ability. - Parameters:
actor
- The actor performing this action.
- Returns:
Promise<void>
- Returns a promise that resolves after checking the element.
public static element(selector: Selector, options?: SelectorOptions): Check;
- Description: Creates a new instance of the
Check
class with the specified selector and options. - Parameters:
selector
- The string representing the selector of the checkbox.options
(optional) - Advanced selector lookup options.
- Returns:
Check
- Returns a newCheck
instance.
public inFrame(frameSelector: FrameSelector): Check;
- Description: Finds the specified frame selector using the
BrowseTheWeb
ability. - Parameters:
frameSelector
- The FrameSelector.
- Returns:
Check
- Returns the current action.
public withAbilityAlias(alias: string): Check;
- Description: Defines the ability alias to be used during execution.
- Parameters:
alias
- The alias.
- Returns:
Check
- Returns the current action.
Introduced in: 1.6.0
public get orSkipOnFail(): Check;
- Description: Allows to skip an action on fail.
- Returns:
Check
- Returns the current action.