chore(core): add wait time between steps for the page to react

This commit is contained in:
Simon
2026-03-03 21:51:10 +08:00
parent 645a7ceb52
commit 06280c2ba5
2 changed files with 3 additions and 1 deletions

View File

@@ -342,6 +342,8 @@ export class PageAgentCore extends EventTarget {
await onAfterTask?.(this, result) await onAfterTask?.(this, result)
return result return result
} }
await waitFor(0.4) // @TODO: configurable
} }
} }

View File

@@ -86,7 +86,7 @@ export async function clickElement(element: HTMLElement) {
// dispatch a click event // dispatch a click event
// element.click() // element.click()
await waitFor(0.1) // Wait to ensure click event processing completes await waitFor(0.2) // Wait to ensure click event processing completes
} }
// eslint-disable-next-line @typescript-eslint/unbound-method // eslint-disable-next-line @typescript-eslint/unbound-method