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:
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:
Name | Type | Attribute | Description |
items | ...items: any[] | The items to be logged |
Public Constructors
public constructor(items: ...items: any[]) source
Params:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
actor | UsesAbilities & AnswersQuestions & CollectsArtifacts |
Returns:
Promise<void> |