SDK の設定
Robot JavaScript SDK の [設定] プロパティを使用すると、ブラウザー アドオンの設定をカスタマイズし、制御を向上させることができます。
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';
既定のオーバーレイ
新しいドメインから要求が発生したときに表示される同意画面をカスタマイズできます。現在、Robot JavaScript SDK には以下の 2 つの画面が含まれます。
同意プロンプト
consent-prompt
オーバーレイは、新しいドメインから UiPath Assistant へのアクセス要求が発生した場合に表示されます。

コンポーネントの不足
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') });
アドオンの設定
アドオンの設定を変更するには、%ProgramFiles%\UiPath\Studio
フォルダーの uipath.config
ファイルを変更する必要があります。
構成ファイルには、以下が含まれている必要があります。
<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. |
9 か月前に更新