ユーザー インターフェイス内の特定のアクションを自動化するには、さまざまなウィンドウ、ボタン、ドロップダウン リストなどを操作する必要があります。UI 要素を識別する方法の 1 つとして、画面上の要素の位置を使用する方法がありますが、これは信頼性が低いことがあります。
より確実な操作を行えるように、UiPath Studio ではセレクターと呼ばれる機能を使用します。セレクターは、グラフィカル ユーザー インターフェイス要素とその親要素の属性を XML フラグメントの形で格納します。
ほとんどの場合、セレクターは Studio によって自動的に生成されます。特に、自動化対象のアプリケーションのユーザー インターフェイスが起動するたびに変わるものでなければ、生成されたセレクターをユーザーが編集する必要はありません。
しかし、一部の Web アプリケーションなど、ソフトウェア プログラムによっては、レイアウトが変わるものや一時的な値を保持する属性ノードを持つものがあります。UiPath Studio はこうした変化を予測することはできないため、場合によってはユーザーがいくつかのセレクターを手動で記述する必要があります。
セレクターは次の構造を持っています。
<node_1/><node_2/>...<node_N/>
最後のノードは対象となる GUI 要素を表し、それより前のノードはすべてその要素の親を表します。<node_1> は通常、ルートノードと呼ばれ、アプリケーションのトップ ウィンドウを表します。
各ノードには 1 つ以上の属性があり、選択したアプリケーションの特定の階層を正しく識別するのに役立ちます。
各ノードは、次の形式で表されます。
<ui_system attr_name_1='attr_value_1' ... attr_name_N='attr_value_N'/>
すべての属性には値が割り当てられています。定数値を持つ属性を選択することが重要です。アプリケーションを起動するたびに属性の値が変わってしまう場合、セレクターは要素を正しく識別することができなくなります。
セレクターは、アクティビティの [プロパティ] パネルの [入力] > [ターゲット] > [セレクター] に生成されます。グラフィカル要素関連のアクティビティはすべてこのプロパティを持っています。

[セレクター エディター] ウィンドウでは、自動生成されたセレクターを表示して、そのセレクターとその属性を編集できます。このウィンドウを開くには、ワークフロー デザイナー パネルでアクティビティの本体にあるオプション ボタン をクリックして [セレクターを編集] を選択します。

これは、[プロパティ] パネルの [セレクター] フィールドの横にある省略記号ボタン を使用して行うこともできます。

Option | Description |
---|---|
Validate | The button shows the status of the selector by checking the validity of the selector definition and the visibility of the target element on the screen. The Validate button has three states: ![]() ![]() ![]() ![]() The button is correlated with UI Explorer validation states. |
Indicate Element | Indicate a new UI element to replace the previous one. |
Repair | Enables you to re-indicate the same target UI element and repair the selector. This operation does not completely replace the previous selector. The button is available only when the selector is invalid. |
Highlight | Brings the target element in the foreground. The highlight stays on until the option is disabled with a click. The button is enabled only if the selector is valid. |
Edit Attributes | Contains all the application components needed to identify the target application (a window, a button etc.). This section is editable. |
Edit Selector | Holds the actual selector. This section is editable. |
Open in UI Explorer | Launches the UI Explorer. The option is enabled only for valid selectors. |
注:
Studio とターゲット アプリケーションを異なる権限で起動した場合、セレクターが動作しないことがあります。これら 2 つのアプリケーションは常に同じ権限で開くことをお勧めします。
サポートされているタグと属性
下表は、セレクターの作成に使用するタグおよび属性と、サポートされているセレクターの機能を示したものです。
注:
Java アプリケーション用に生成される複数の WND タグを含むセレクターは、イベントの監視に使用できません。
WND
Attribute | Fuzzy | RegEx | Case-Sensitive |
---|---|---|---|
app | ![]() | ![]() | ![]() |
cls | ![]() | ![]() | ![]() |
title | ![]() | ![]() | ![]() |
aaname | ![]() | ![]() | ![]() |
ctrlname (WinForms) | ![]() | ![]() | ![]() |
ctrlid (WinForms) | ![]() | ![]() | ![]() |
idx | ![]() | ![]() | ![]() |
tid | ![]() | ![]() | ![]() |
pid | ![]() | ![]() | ![]() |
isremoteapp | ![]() | ![]() | ![]() |
aastate | ![]() | ![]() | ![]() |
sapClient (SAP) | ![]() | ![]() | ![]() |
sapLanguage (SAP) | ![]() | ![]() | ![]() |
sapProgram (SAP) | ![]() | ![]() | ![]() |
sapScreen (SAP) | ![]() | ![]() | ![]() |
sapSession (SAP) | ![]() | ![]() | ![]() |
sapSysName (SAP) | ![]() | ![]() | ![]() |
sapSysNumber (SAP) | ![]() | ![]() | ![]() |
sapSysSessionId (SAP) | ![]() | ![]() | ![]() |
sapTransaction (SAP) | ![]() | ![]() | ![]() |
sapUser (SAP) | ![]() | ![]() | ![]() |
HTML
Attribute | Fuzzy | RegEx | Case-Sensitive |
---|---|---|---|
url | ![]() | ![]() | ![]() |
htmlwindowname | ![]() | ![]() | ![]() |
title | ![]() | ![]() | ![]() |
class | ![]() | ![]() | ![]() |
app | ![]() | ![]() | ![]() |
idx | ![]() | ![]() | ![]() |
pid | ![]() | ![]() | ![]() |
tid | ![]() | ![]() | ![]() |
excludehwnd | ![]() | ![]() | ![]() |
bsid (Browser Session ID) | ![]() | ![]() | ![]() |
isremoteapp | ![]() | ![]() | ![]() |
WEBCTRL
tag および idx 属性は文字列値を使用します。その他の WEBCTRL 属性は、すべて動的な値を取ります。
Attribute | Fuzzy | RegEx | Case-Sensitive |
---|---|---|---|
tag | ![]() | ![]() | ![]() |
idx | ![]() | ![]() | ![]() |
aaname | ![]() | ![]() | ![]() |
name | ![]() | ![]() | ![]() |
id | ![]() | ![]() | ![]() |
parentid | ![]() | ![]() | ![]() |
class | ![]() | ![]() | ![]() |
css-selector | ![]() | ![]() | ![]() |
innertext | ![]() | ![]() | ![]() |
visibleinnertext | ![]() | ![]() | ![]() |
isleaf | ![]() | ![]() | ![]() |
parentclass | ![]() | ![]() | ![]() |
parentname | ![]() | ![]() | ![]() |
src | ![]() | ![]() | ![]() |
href | ![]() | ![]() | ![]() |
tableCol | ![]() | ![]() | ![]() |
tableRow | ![]() | ![]() | ![]() |
colName | ![]() | ![]() | ![]() |
rowName | ![]() | ![]() | ![]() |
aria-label | ![]() | ![]() | ![]() |
aria-labelledby | ![]() | ![]() | ![]() |
Ctrl
Attribute | Fuzzy | RegEx | Case-Sensitive |
---|---|---|---|
role | ![]() | ![]() | ![]() |
name | ![]() | ![]() | ![]() |
automationid | ![]() | ![]() | ![]() |
labeledby | ![]() | ![]() | ![]() |
aastate | ![]() | ![]() | ![]() |
virtualname | ![]() | ![]() | ![]() |
text | ![]() | ![]() | ![]() |
rowName | ![]() | ![]() | ![]() |
idx | ![]() | ![]() | ![]() |
UIA
Attribute | Fuzzy | RegEx | Case-Sensitive |
---|---|---|---|
accelkey (Accelerator Key) | ![]() | ![]() | ![]() |
acskey (Access Key) | ![]() | ![]() | ![]() |
automationid | ![]() | ![]() | ![]() |
cls | ![]() | ![]() | ![]() |
helpText | ![]() | ![]() | ![]() |
legacyAccHelp (Legacy Accessible Help) | ![]() | ![]() | ![]() |
enabled | ![]() | ![]() | ![]() |
kbfocus (Is Keyboard Focusable) | ![]() | ![]() | ![]() |
ispwd (Is Password) | ![]() | ![]() | ![]() |
itemstatus | ![]() | ![]() | ![]() |
itemtype | ![]() | ![]() | ![]() |
rtid (Runtime ID) | ![]() | ![]() | ![]() |
role | ![]() | ![]() | ![]() |
name | ![]() | ![]() | ![]() |
pid | ![]() | ![]() | ![]() |
tableRow | ![]() | ![]() | ![]() |
tableCol | ![]() | ![]() | ![]() |
rowName | ![]() | ![]() | ![]() |
colName | ![]() | ![]() | ![]() |
idx | ![]() | ![]() | ![]() |
Java
Attribute | Fuzzy | RegEx | Case-Sensitive |
---|---|---|---|
role | ![]() | ![]() | ![]() |
name | ![]() | ![]() | ![]() |
virtualname | ![]() | ![]() | ![]() |
javastate | ![]() | ![]() | ![]() |
tableRow | ![]() | ![]() | ![]() |
tableCol | ![]() | ![]() | ![]() |
rowName | ![]() | ![]() | ![]() |
colName | ![]() | ![]() | ![]() |
idx | ![]() | ![]() | ![]() |
SAP
Attribute | Fuzzy | RegEx | Case-Sensitive |
---|---|---|---|
id | ![]() | ![]() | ![]() |
leafid This attribute is not exposed in the Attribute panel because it is mutual-exclusive with the id attribute. It can be added manually. | ![]() | ![]() | ![]() |
tableRow | ![]() | ![]() | ![]() |
tableCol | ![]() | ![]() | ![]() |
colName | ![]() | ![]() | ![]() |
relpath | ![]() | ![]() | ![]() |
itemId | ![]() | ![]() | ![]() |
Silverlight
Silverlight タグは、あいまい、正規表現、大文字と小文字を区別する機能をサポートしない点にご注意ください。
5 か月前に更新