SDK-Einstellungen
Mit der Eigenschaft Settings des Roboter-JavaScript-SDK können Sie Ihre Kontrolle über die Einrichtung des Browser-Add-Ons personalisieren und verbessern.
class Settings {
portNumber: number;
pollTimeInterval: number;
disableTelemetry: boolean;
appOrigin: string;
}
Attribute | Description |
---|---|
portNumber | Allows you to configure custom ports on which the back-end services run on. The default port number is 2323. Please note that this is only available for Enterprise installations. |
pollTimeInterval | Allows you to 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 |
disableTelemetry | Allows you to disable the telemetry flag. The default value is false . |
appOrigin | Allows you to 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';
Standardeinblendung
Es ist möglich, den Zustimmungsbildschirm anzupassen, der angezeigt wird, wenn eine Anforderung von einer neuen Domäne ausgelöst wird. Es gibt derzeit zwei Bildschirme, die im Roboter-JavaScript-SDK enthalten sind:
Zustimmungsaufforderung
Die Einblendung consent-prompt
wird angezeigt, wenn eine Anforderung für den Zugriff auf UiPath Assistant von einer neuen Domäne aus ausgelöst wird.

Fehlende Komponenten
Die Einblendung missing-components
wird angezeigt, wenn das erforderliche Add-On nicht auf der lokalen Maschine vorhanden ist.

Einblendungsmeldungen können wie im Beispiel unten konfiguriert werden.
// 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') });
Add-on-Einstellungen
Um Add-on-Einstellungen zu ändern, müssen Sie die uipath.config
-Datei im Ordner %ProgramFiles%\UiPath\Studio
ändern.
Die Konfigurationsdatei muss Folgendes enthalten:
<robotJsSettings>
<add key="ListenerPort" value="2323" />
<add key="TokenExpiryInDays" value="30" />
</robotJsSettings>
Attribute | Description |
---|---|
ListenerPort | The 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. Please note that the port value here needs to match the one configured in the SDK Settings. |
TokenExpiryInDays | Any request coming from a new domain needs to have consent from the user to allow access of UiPath Robots from a web application. These consents are valid for the said number of days mentioned in this setting. |
Aktualisiert vor 9 Monaten