Skip to main content

Log

Instructs the Actor to collect arbitrary static values and answers to Answerables, so that they can be sent to the StageCrewMembers and printed to the terminal by the ConsoleReporter or attached to the HTML report by the SerenityBDDReporter.

Logging static and Answerable values

import { actorCalled, Log } from '@serenity-js/core'
import { Page } from '@serenity-js/web'

await actorCalled('Laura').attemptsTo(
Log.the('Current page', Page.current().title(), Page.current().url()),
)

Hierarchy

Index

Methods

staticthe

instantiationLocation

  • instantiationLocation(): FileSystemLocation
  • Returns the location where this Activity was instantiated.


    Returns FileSystemLocation

toString

  • toString(): string
  • Generates a human-friendly description to be used when reporting this Activity.

    Note: When this activity is reported, token #actor in the description will be replaced with the name of the actor performing this Activity.

    For example, #actor clicks on a button becomes Wendy clicks on a button.


    Returns string

performAs