robot
2024.10
false
Robot 開発者ガイド
- Robot JavaScript SDK
重要 :
このコンテンツの一部は機械翻訳によって処理されており、完全な翻訳を保証するものではありません。
新しいコンテンツの翻訳は、およそ 1 ~ 2 週間で公開されます。
Robot JavaScript SDK ブラウザー アドオンの設定クラス フィールド (ポート番号、ポーリング間隔、テレメトリ、アプリの発信元オプションなど)
SDK の設定
Robot JavaScript SDK の [設定] プロパティを使用すると、ブラウザー アドオンの設定をカスタマイズし、制御を向上させることができます。
class Settings {
portNumber: number;
pollTimeInterval: number;
disableTelemetry: boolean;
appOrigin: string;
}
class Settings {
portNumber: number;
pollTimeInterval: number;
disableTelemetry: boolean;
appOrigin: string;
}
| 属性 | 説明 |
|---|---|
portNumber | Lets you configure custom ports on which the back-end services run on. The default port number is 2323. Only available for Enterprise installations. |
pollTimeInterval | Lets 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 |
disableTelemetry | Lets you disable the telemetry flag. The default value is false. |
appOrigin | Lets 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';
アドオンの設定
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>
| 属性 | 説明 |
|---|---|
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. The port value must match the one configured in the SDK Settings. |
TokenExpiryInDays | 新しいドメインからの要求には、Web アプリケーションから UiPath Robots のアクセスを許可するためのユーザーの同意が必要です。この同意は、この設定で指定されている日数の間有効です。 |
既定のオーバーレイ
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:
同意プロンプト
consent-prompt オーバーレイは、新しいドメインから UiPath Assistant へのアクセス要求が発生した場合に表示されます。
コンポーネントの不足
missing-components オーバーレイは、必要なアドオンがローカル マシンに存在しない場合に表示されます。
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') });