externalDebug <Values>
Hierarchy
- Interaction
- Debug
Index
Methods
staticexternalvalues
Instructs the actor to evaluate the provided
values
, log the results, and then pass them to yourdebuggerFunction
.To use this interaction, run your test scenario in the Node.js debugger and set a breakpoint inside the
debuggerFunction
.Type parameters
- Values: unknown[]
Parameters
externaldebuggerFunction: (results: { [ Index in string | number | symbol ]: DebuggingResult<Values[Index<Index>]> }, ...answers: { [ Index in string | number | symbol ]: Answered<Values[Index<Index>]> }) => void | Promise<void>
externalrest...values: Values
Returns Interaction
externalinstantiationLocation
Returns the location where this
Activity
was instantiated.Returns FileSystemLocation
externalperformAs
Instructs the provided
Actor
to perform thisInteraction
.Learn more
Parameters
externalactor: UsesAbilities & AnswersQuestions & CollectsArtifacts
Returns Promise<void>
externaldescribedBy
Resolves the description of this object in the context of the provided
actor
.Parameters
externalactor: AnswersQuestions & UsesAbilities & { name: string }
Returns Promise<string>
externaltoString
Returns a human-readable description of this object.
Returns string
Instructs the actor to evaluate and log the provided answerable values.
Since this interaction accepts a callback function that receives the evaluated results, the best way to use it is while running the test scenario via a Node.js debugger. See the links below to learn how to do it in popular IDEs.
Debugging Answerable values
Debug.values
accepts a callback function that receives an array ofDebuggingResult
objects, as well as the result of evaluating each provided answerable withActor.answer
.Accessing Playwright Page
Playwright Test for VSCode provides features that allow for experimenting with web UI locators while the test is paused at breakpoint.
Since this functionality is specific to Playwright, you can use it by passing
PlaywrightPage.current().nativePage()
to Serenity/JSDebug.values
. Also make sure to name the evaluated valuepage
, as this is the variable name that the Playwright VSCode extension expects.Learn more