coreActorsactorCalledactorCalled CallableactorCalled(name: string): ActorInstantiates or retrieves an Actor called name if one has already been instantiated. This method is an alias for Serenity.theActorCalled. Usage with Mocha import { describe, it } from 'mocha'; import { actorCalled } from '@serenity-js/core'; describe('Feature', () => { it('should have some behaviour', () => actorCalled('James').attemptsTo( // ... activities )) }) Usage with Jasmine import 'jasmine'; import { actorCalled } from '@serenity-js/core'; describe('Feature', () => { it('should have some behaviour', () => actorCalled('James').attemptsTo( // ... activities )) }) Usage with Cucumberimport { actorCalled } from '@serenity-js/core';import { Given } from '@cucumber/cucumber';Given(/(.*?) is a registered user/, (name: string) => actorCalled(name).attemptsTo( // ... activities )) Learn moreengageActorCastSerenity.theActorCalledParametersname: stringThe name of the actor to instantiate or retrieveReturns Actor
Instantiates or retrieves an Actor called
name
if one has already been instantiated.This method is an alias for Serenity.theActorCalled.
Usage with Mocha
Usage with Jasmine
Usage with Cucumber
Learn more