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

Campos de configuración

Campos de configuración para el complemento del navegador Robot JavaScript SDK, incluido el número de puerto, el intervalo de sondeo, la telemetría y las opciones de configuración del origen de la aplicación.

Ajustes de SDK

La propiedad Configuración del SDK JavaScript del Robot te permite personalizar y mejorar tu control sobre la configuración del complemento del navegador.

class Settings {
  portNumber: number;
  pollTimeInterval: number;
  disableTelemetry: boolean;
  appOrigin: string;
}
class Settings {
  portNumber: number;
  pollTimeInterval: number;
  disableTelemetry: boolean;
  appOrigin: string;
}
AtributoDescripción
portNumberLets you configure custom ports on which the back-end services run on. The default port number is 2323. Only available for Enterprise installations.
pollTimeIntervalLets you specify the time in milliseconds in which the Robot JavaScript SDK keeps track of a process execution from a web page. The default value is 250 milliseconds. This value determines the polling frequency from the web browser
disableTelemetryLets you disable the telemetry flag. The default value is false.
appOriginLets you specify the application which uses the SDK. The default value is picked up from the window.location.origin class.
const robot = UiPathRobot.init();
robot.settings.portNumber = 1234;
robot.settings.pollTimeInterval = 1000; 
robot.settings.disableTelemetry = true; 
robot.settings.appOrigin = 'MyApp';
const robot = UiPathRobot.init();
robot.settings.portNumber = 1234;
robot.settings.pollTimeInterval = 1000; 
robot.settings.disableTelemetry = true; 
robot.settings.appOrigin = 'MyApp';

Ajustes del complemento

Add-on settings are configured in the uipath.config file in the %ProgramFiles%\UiPath\Studio folder.

The configuration file must contain the following:

<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.

Superposición predeterminada

It is possible to customize the consent screen displayed when a request is raised from a new domain. Two screens are delivered with the Robot JavaScript SDK:

Se muestra la superposición consent-prompt cuando se eleva una solicitud para acceder al UiPath Assistant desde un nuevo dominio.

Faltan componentes

Se muestra la superposición missing-components cuando el complemento necesario no está presente en la máquina local.

Overlay messages can be configured as shown in the following example.

// Consent code will be written to the console instead of showing default overlay
// Error logged to console when required components are missing insread of showing
// default error overlay
const robot = UiPathRobot.init();
robot.on('consent-prompt', function(consentCode){ console.log(consentCode) });
robot.on('missing-components', function(){ console.log('Missing components') });
// Consent code will be written to the console instead of showing default overlay
// Error logged to console when required components are missing insread of showing
// default error overlay
const robot = UiPathRobot.init();
robot.on('consent-prompt', function(consentCode){ console.log(consentCode) });
robot.on('missing-components', function(){ console.log('Missing components') });
  • Ajustes de SDK
  • Ajustes del complemento
  • Superposición predeterminada
  • Solicitud de consentimiento
  • Faltan componentes

¿Te ha resultado útil esta página?

Conectar

¿Necesita ayuda? Soporte

¿Quiere aprender? UiPath Academy

¿Tiene alguna pregunta? Foro de UiPath

Manténgase actualizado