import {ProtractorParam} from '@serenity-js/protractor/lib/screenplay/questions'
public class | source

ProtractorParam

Returns a Protractor configuration parameter specified in protractor.conf.js. Note that Protractor configuration parameters can be overridden via the command line.

Extends:

Question<Promise<T>> → ProtractorParam

Examples:

protractor.conf.js
 exports.config = {
   params: {
       login: {
           username: 'jane@example.org'
           password: process.env.PASSWORD
       }
   }
   // ...
}
Overriding configuration parameter via the command line
 protractor ./protractor.conf.js --params.login.username="bob@example.org"
Using in a test scenario
 import { actorCalled } from '@serenity-js/core';
 import { BrowseTheWeb, Enter, ProtractorParam } from '@serenity-js/protractor';
 import { protractor } from 'protractor';

 actorCalled('Jane')
     .whoCan(BrowseTheWeb.using(protractor.browser))
     .attemptsTo(
         Enter.theValue(ProtractorParam.called('login.username').into(Form.exampleInput),
     );

Static Method Summary

Static Public Methods
public static

called(name: Answerable<string>): ProtractorParam<R>

Name of the parameter to retrieve.

Constructor Summary

Public Constructor
public

constructor(name: Answerable<string>)

Method Summary

Public Methods
public

answeredBy(actor: AnswersQuestions & UsesAbilities): Promise<void>

Makes the provided Actor answer this Question.

Public Constructors

public constructor(name: Answerable<string>) source

Params:

NameTypeAttributeDescription
name Answerable<string>

Public Methods

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

Makes the provided Actor answer this Question.

Params:

NameTypeAttributeDescription
actor AnswersQuestions & UsesAbilities

Returns:

Promise<void>