mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
fix: gracefully skip invalid pressKey values in QA recording
Instead of crashing the entire recording session when Gemini generates an invalid key name (e.g. "mouseWheelDown"), catch the error and continue with remaining steps.
This commit is contained in:
@@ -357,8 +357,14 @@ async function executeSteps(
|
||||
await fillDialogAndConfirm(page, step.text)
|
||||
break
|
||||
case 'pressKey':
|
||||
await page.keyboard.press(step.key)
|
||||
await sleep(300)
|
||||
try {
|
||||
await page.keyboard.press(step.key)
|
||||
await sleep(300)
|
||||
} catch (e) {
|
||||
console.warn(
|
||||
`Skipping invalid key "${step.key}": ${e instanceof Error ? e.message : e}`
|
||||
)
|
||||
}
|
||||
break
|
||||
case 'click':
|
||||
await clickByText(page, step.text)
|
||||
|
||||
Reference in New Issue
Block a user