UiPath Documentation
robot
2023.10
false
Guía del desarrollador de Robot
  • Robot JavaScript SDK
    • Acerca del SDK JavaScript de Robot
    • Pasos de configuración
Importante :
La localización de contenidos recién publicados puede tardar entre una y dos semanas en estar disponible.

Pasos de configuración

Prerequisites and configuration for the Robot JavaScript SDK, including installing the UiPath JavaScript Add-On and granting origin access.

This page covers the prerequisites and configuration for using the Robot JavaScript SDK in custom web applications, including setting up browser and Robot consent access, installing the SDK, and configuring the JavaScript Add-On.

Requisitos previos

The following prerequisites must be met for automation projects to use the Robot JavaScript SDK:

  • Studio y Robot versión 2021.10 o superior instalada
  • El complemento JavaScript de UiPath instalado en la máquina de Robot

Permitiendo acceso

When the UiPath Robot JavaScript Add-On is run, access must be granted for your custom application or web page to connect to the Robot. The access is handled by a two-step dialog — both steps must be confirmed to run RobotJS. Both dialogs support automation as described in the following sections.

Explorador de acceso del cuadro de diálogo

Este paso se refiere al explorador que solicita permisos para abrir el UiPath Assistant.

Aceptación automática del cuadro de diálogo de acceso al explorador

The uipath-web://* value, added as a trusted URL in the browser's settings, automates this dialog. The uipath-web://* refers to the UiPath Robot web protocol handler.

Nota:

Según el explorador utilizado, hay que establecer diferentes configuraciones. Por ejemplo, si utilizas Google Chrome, sigue los pasos descritos en la documentación de Google Chrome URLAllowList.

El cuadro de diálogo de permiso de UiPath Robot se utiliza para permitir la conexión entre Robot JavaScript SDK y Ejecutor de robot.

The UIPATH_ROBOTJS_ALLOWLIST System Environment Variable automatically accepts the robot consent dialog.

The variable value must contain the URLs of your custom application or web page, separated by semicolons. The URL should contain the port number only if a standard port is not used (80 or 443).

El SDK JavaScript de Robot

Este SDK proporciona todos los métodos y propiedades necesarios que puedes incluir en tu aplicación o página web personalizada. Puedes descargarlo de la siguiente forma:

NPM

The npm package is available with TypeScript bindings. To include it in your project:

  1. Run the following command at the root of your project directory:

    npm install --save @uipath/robot
    npm install --save @uipath/robot
    

CDN

For CDN:

  1. Add the following script tag before the closing </body> tag:

    <body>
    ...
    ...
    <script href="//download.uipath.com/js/1.3.2/UiPathRobot.js"></script>
    </body>
    <body>
    ...
    ...
    <script href="//download.uipath.com/js/1.3.2/UiPathRobot.js"></script>
    </body>
    

Direct download

Download the Robot JavaScript SDK via direct download.

Ajustes del complemento

To configure add-on settings:

  1. Open the uipath.config file in the installation folder.
  2. Add the ListenerPort and TokenExpiryInDays parameters to the <robotJsSettings> section. By default, the section does not contain any keys:
<robotJsSettings>
    <add key="ListenerPort" value="2323" />
    <add key="TokenExpiryInDays" value="30" />
</robotJsSettings>
<robotJsSettings>
    <add key="ListenerPort" value="2323" />
    <add key="TokenExpiryInDays" value="30" />
</robotJsSettings>
AtributoDescripción
ListenerPortThe UiPath.RobotJS.ServiceHost.exe starts a HttpListener on the configured port and contains the information about other local listeners from the active user session on that system. The port value must match the one configured in the SDK Settings.
TokenExpiryInDaysCualquier solicitud que provenga de un nuevo dominio debe tener consentimiento del usuario para permitir el acceso de UiPath Robots desde una aplicación web. Estos consentimientos son válidos para el número de días mencionado en este ajuste.

¿Te ha resultado útil esta página?

Conectar

¿Necesita ayuda? Soporte

¿Quiere aprender? UiPath Academy

¿Tiene alguna pregunta? Foro de UiPath

Manténgase actualizado