{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/es/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Ejecutar script JS","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"ejecutar-script-js","__idx":0},"children":["Ejecutar script JS"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"parámetros","__idx":1},"children":["Parámetros"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Agregar parámetro"]},": Puedes agregar variables. El nombre de la variable se puede verificar directamente en el script en el siguiente paso."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Ejecutar script JS"]},": Puedes agregar código JavaScript aquí."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Formato de salida"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Cadena"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Entero"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Número"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Booleano"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Objeto Element"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["¿Qué significan estos campos?"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"salida","__idx":2},"children":["Salida"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parámetros de salida"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["El resultado de la ejecución del script."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Registro de ejecución"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Hora de inicio"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Hora de finalización"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Duración (ms)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Estado (Éxito/Error)"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ejemplo","__idx":3},"children":["Ejemplo"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ejemplo 1: Generar un número aleatorio."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ejemplo 2: Analizar el contenido de un elemento."]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["[!TIP]"," ","Puedes pasar las variables generadas en el proyecto directamente a la IA para generar scripts. Mensaje: \"{} Quiero extraer el contenido del campo 'name' mediante JavaScript y, finalmente, mostrar su valor.\""]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"nodos-relacionados","__idx":4},"children":["Nodos relacionados"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Acciones del teclado"]}]},"headings":[{"value":"Ejecutar script JS","id":"ejecutar-script-js","depth":1},{"value":"Parámetros","id":"parámetros","depth":2},{"value":"Salida","id":"salida","depth":2},{"value":"Ejemplo","id":"ejemplo","depth":2},{"value":"Nodos relacionados","id":"nodos-relacionados","depth":2}],"frontmatter":{"seo":{"title":"Ejecutar script JS"}},"lastModified":"2026-06-10T11:47:34.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/es/rparobotic-process-automation/03-node/02-data-processing/01-run-js-script","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}