1
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.

【UiPath】要素の存在を確認 (Element Exists) でトップレベルウィンドウが取れなくてもエラーにならなくなってた

Posted at

要素の存在を確認 (Element Exists) アクティビティは要素が見つかったらTrue、見つからなければFalseを返します。
なのでエラーにはならなそうですが、部分セレクターでトップレベルウィンドウが取れないとエラーになります。
という記事を書こうとしたんですが、v2022.4時点ではエラーにならなくなってました。
いつ修正されたかは確認できてないですが、せっかくなので記録として記事にしておきます。

どこでエラーになるのか

image.png
image.png

上図のシーケンスでは、次の順番で処理を行っています。
①ブラウザーにアタッチする。
②メッセージボックスを表示する。
③要素の存在を確認する。
④要素の存在の確認結果をログ出力する。

また、③要素の存在を確認する では部分セレクターを使用しています。

この処理の場合、②メッセージボックスを表示する のタイミングでブラウザーを閉じると、
次の③要素の存在を確認する がエラーになります。
トップレベルウィンドウのセレクターが取得できないとエラーということですね。
v2022.4時点ではエラーにならず、④でFalseが返ります。

参考

1
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
1
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?