feat: get last pair & target url

This commit is contained in:
amhsirak
2025-03-18 23:45:21 +05:30
parent ca9f63b09f
commit 8165e385cf

View File

@@ -408,6 +408,9 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin
return acc;
}, {} as Record<string, CredentialInfo>);
const lastPair = robot.recording.workflow[robot.recording.workflow.length - 1];
const targetUrl = lastPair?.what.find(action => action.action === "goto")?.args?.[0];
const payload = {
name: robot.recording_meta.name,
limit: robot.recording.workflow[0]?.what[0]?.args?.[0]?.limit,