Skip to content

Commit 2e93367

Browse files
committed
🔄 synced local 'skyvern/' with remote 'skyvern/'
## Summary - Fixed `TypeError: 'ActionDragPath' object is not subscriptable` error in CUA drag action parsing - The OpenAI CUA drag action returns `path` as `List[ActionDragPath]` where each `ActionDragPath` is an object with `.x` and `.y` attributes, not a subscriptable list/tuple - Updated code to access `ActionDragPath` attributes using `.x` and `.y` instead of subscript operators `[0]` and `[1]` - Convert `ActionDragPath` objects to tuples for `DragAction.path` field which expects `list[tuple[int, int]]` ## Test plan - [ ] Verify CUA drag actions are parsed correctly without errors - [ ] Test drag operations in browser automation tasks 🤖 Generated with [Claude Code](https://claude.ai/code)
1 parent 4301e31 commit 2e93367

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎skyvern/webeye/actions/parse_actions.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,12 +370,13 @@ async def parse_cua_actions(
370370
intention=reasoning,
371371
)
372372
else:
373-
start_x, start_y = whole_path[0][0], whole_path[0][1]
373+
# ActionDragPath objects have x and y attributes
374+
start_x, start_y = whole_path[0].x, whole_path[0].y
374375
reasoning = reasoning or f"Drag action path: {whole_path}"
375376
action = DragAction(
376377
start_x=start_x,
377378
start_y=start_y,
378-
path=whole_path[1:],
379+
path=[(p.x, p.y) for p in whole_path[1:]],
379380
reasoning=reasoning,
380381
intention=reasoning,
381382
)

0 commit comments

Comments
 (0)