import {Log} from '@serenity-js/core/lib/screenplay/interactions'
public class | source

Log

Enables the Actor to log arbitrary static values and answers to Questions, so that they can be printed to the terminal by the ConsoleReporter and attached to the HTML report by the SerenityBDDReporter.

Extends:

Interaction → Log

Indirect Implements:

Examples:

 import { Log } from '@serenity-js/core';
 import { Website } from '@serenity-js/protractor';

 actor.attemptsTo(
     Log.the('Current page', Website.title(), Website.url()),
 );

Static Method Summary

Static Public Methods
public static

the(items: ...items: any[]): Interaction

Instantiates a new Log Interaction.

Constructor Summary

Public Constructor
public

constructor(items: ...items: any[])

Method Summary

Public Methods
public

performAs(actor: UsesAbilities & AnswersQuestions & CollectsArtifacts): Promise<void>

Makes the provided Actor perform this Interaction.

public

toString(): string

Generates a description to be used when reporting this Activity.

Inherited Summary

From class Interaction
public static

where(description: string, interaction: Function): Interaction

Static Public Methods

public static the(items: ...items: any[]): Interaction source

Instantiates a new Log Interaction.

Params:

NameTypeAttributeDescription
items ...items: any[]

The items to be logged

Returns:

Interaction

Public Constructors

public constructor(items: ...items: any[]) source

Params:

NameTypeAttributeDescription
items ...items: any[]

The items to be logged

Public Methods

public performAs(actor: UsesAbilities & AnswersQuestions & CollectsArtifacts): Promise<void> source

Makes the provided Actor perform this Interaction.

Params:

NameTypeAttributeDescription
actor UsesAbilities & AnswersQuestions & CollectsArtifacts

Returns:

Promise<void>

public toString(): string source

Generates a description to be used when reporting this Activity.

Returns:

string