0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Bizrobo! DAで入力処理が空ぶる~「hasKeyboardFocus」を使ってさらにロボットの安定化!~

Posted at

こんにちは!
今回はBizrobo! 「hasKeyboardFocus」を使ってさらにロボットの安定化!です。
早速ですが、入力が空ぶってしまう、、、という経験はありませんか?
今回はその入力が空ぶることに対する対策(100%ではないですが、、、)をご紹介します。



◆そもそもhasKeyboardFocusとは
hasKeyboardFocus自体のことは私も知りません。(おいおい)
ただ、Bizrobo!においていえばカーソルが当たっている時に生成される属性の1つです。
メモ帳を使って実際に見せますね。

image.png
<編集 handle="264548" name="テキスト エディター" className="Edit" automationId="15" isEnabled="true" isKeyboardFocusable="true" der_x="8" der_y="51" der_width="861" der_height="508">
↑カーソルが当たっていないのでない

image.png

<編集 handle="264548" name="テキスト エディター" className="Edit" automationId="15" hasKeyboardFocus="true" isEnabled="true" isKeyboardFocusable="true" der_x="8" der_y="51" der_width="861" der_height="508">
↑カーソルが当たっていると「hasKeyboardFocus="true"」属性を認識するようになる

◆hasKeyboardFocusをどうやって使うのか
ここからは実際にどうやって使うのかを箇条書きで説明します。

・使うステップ:GuardedChoice(LocationFound)

①とりあえず、対象画面からLocationFoundを作る
image.png

②デフォルトだと、「hasKeyboardFocus="true"」の属性がないので足す
image.png

image.png

③このままだと、無限待機になる可能性があるのでタイムアウト設定をする
image.png

④そのあと、入力処理を入れる

以上で完成です!

※InputTextで入力させる場合
デフォルトだと、InputTextの前に何もないのでここに上記と同じ入力待機を設ける
image.png

image.png
※DA端末の動きが遅いときはMoveMouseの後ろとPressKeyの前後に少しだけ待機時間を置いてみてもいいかもしれません。


ここまでお疲れ様でした。
これで皆さんのロボットがより安定すれば幸いです。
実は、LocationFoundのコンポーネントってかなり自由度高いので今後も紹介していければと思います。

では、より良いRPAライフを~

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?