import {TakeScreenshot} from '@serenity-js/protractor/lib/screenplay/interactions'
TakeScreenshot
Instructs the Actor to take a screenshot and emit an Artifact, which can then be persisted by ArtifactArchiver and reported by Serenity BDD reporter.
Extends:
Examples:
import { actorCalled } from '@serenity-js/core';
import { BrowseTheWeb, Navigate, TakeScreenshot } from '@serenity-js/protractor';
import { protractor } from 'protractor';
actorCalled('Tania')
.whoCan(BrowseTheWeb.using(protractor.browser))
.attemptsTo(
Navigate.to('/app'),
TakeScreenshot.of('my app'),
);
Tests:
Static Method Summary
Static Public Methods | ||
public static |
of(name: Answerable<string>): Interaction Instantiates this Interaction. |
Constructor Summary
Public Constructor | ||
public |
constructor(name: Answerable<string>) |
Method Summary
Public Methods | ||
public |
performAs(actor: UsesAbilities & AnswersQuestions): PromiseLike<void> Makes the provided Actor perform this Interaction. |
|
public |
toString(): string Generates a description to be used when reporting this Activity. |
Static Public Methods
public static of(name: Answerable<string>): Interaction source
Instantiates this Interaction.
Params:
Name | Type | Attribute | Description |
name | Answerable<string> | The name to associate the screenshot with |
Public Constructors
public constructor(name: Answerable<string>) source
Params:
Name | Type | Attribute | Description |
name | Answerable<string> | The name to associate the screenshot with |
Public Methods
public performAs(actor: UsesAbilities & AnswersQuestions): PromiseLike<void> source
Makes the provided Actor perform this Interaction.
Params:
Name | Type | Attribute | Description |
actor | UsesAbilities & AnswersQuestions | An Actor to perform this Interaction |
Returns:
PromiseLike<void> |