From 33e4e1829ef59b68412899eb6908664956f3dd98 Mon Sep 17 00:00:00 2001 From: Akash Mole Date: Wed, 1 Apr 2026 18:26:04 +0530 Subject: [PATCH] fix: prevent type action text from being used as element locator in resolveTarget When the `type` action has both `text` (content to type) and `selector` (element to target), `resolveTarget` receives the full step object and incorrectly uses `text` as an element locator instead of `selector`. This causes `Element not found: text=""` errors. Pass only `{ selector, within }` to `resolveTarget` so the `text` field is correctly reserved for the content to type. Co-Authored-By: Claude Opus 4.6 (1M context) --- packages/webreel/src/lib/runner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/webreel/src/lib/runner.ts b/packages/webreel/src/lib/runner.ts index e97ee17..7f04c9f 100644 --- a/packages/webreel/src/lib/runner.ts +++ b/packages/webreel/src/lib/runner.ts @@ -284,7 +284,7 @@ export async function runVideo( case "type": { if (step.selector) { - const box = await resolveTarget(client, step); + const box = await resolveTarget(client, { selector: step.selector, within: step.within }); const { x: tx, y: ty } = randomPointInBox(box); await clickAt(ctx, client, tx, ty); await client.Runtime.evaluate({