From 9227da7ce963375ec878dad1ab4e05fedca29351 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Fri, 25 Oct 2024 20:12:18 +0530 Subject: [PATCH] fix: robot target url --- src/components/molecules/RobotSettings.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/molecules/RobotSettings.tsx b/src/components/molecules/RobotSettings.tsx index aeffadf6..1cb50923 100644 --- a/src/components/molecules/RobotSettings.tsx +++ b/src/components/molecules/RobotSettings.tsx @@ -71,6 +71,11 @@ export const RobotSettingsModal = ({ isOpen, handleStart, handleClose, initialSe } } + const lastPair = robot?.recording.workflow[robot?.recording.workflow.length - 1]; + + // Find the `goto` action in `what` and retrieve its arguments + const targetUrl = lastPair?.what.find(action => action.action === "goto")?.args?.[0]; + return (