feat: change onAfterStep params
This commit is contained in:
@@ -281,7 +281,7 @@ export class PageAgent extends EventTarget {
|
|||||||
console.log(chalk.green('Step finished:'), actionName)
|
console.log(chalk.green('Step finished:'), actionName)
|
||||||
console.groupEnd()
|
console.groupEnd()
|
||||||
|
|
||||||
await onAfterStep.call(this, step, this.history)
|
await onAfterStep.call(this, this.history)
|
||||||
|
|
||||||
step++
|
step++
|
||||||
if (step > MAX_STEPS) {
|
if (step > MAX_STEPS) {
|
||||||
|
|||||||
@@ -68,11 +68,7 @@ export interface AgentConfig {
|
|||||||
// @todo: remove `this` binding, pass agent as explicit parameter instead
|
// @todo: remove `this` binding, pass agent as explicit parameter instead
|
||||||
|
|
||||||
onBeforeStep?: (this: PageAgent, stepCnt: number) => Promise<void> | void
|
onBeforeStep?: (this: PageAgent, stepCnt: number) => Promise<void> | void
|
||||||
onAfterStep?: (
|
onAfterStep?: (this: PageAgent, history: HistoricalEvent[]) => Promise<void> | void
|
||||||
this: PageAgent,
|
|
||||||
stepCnt: number,
|
|
||||||
history: HistoricalEvent[]
|
|
||||||
) => Promise<void> | void
|
|
||||||
onBeforeTask?: (this: PageAgent) => Promise<void> | void
|
onBeforeTask?: (this: PageAgent) => Promise<void> | void
|
||||||
onAfterTask?: (this: PageAgent, result: ExecutionResult) => Promise<void> | void
|
onAfterTask?: (this: PageAgent, result: ExecutionResult) => Promise<void> | void
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user