繰り返しの都度WebページのOpen/Closeが発生することを避ける方法

UiPath Studio 2023.6.1 Community Editionを利用中の初心者です。
ループ処理の中で、ExcelからRead RangeXアクティビティでDataTableにデータ取得し、Webページにデータ入力するWFを作成中です。

Webページにデータ入力する処理はMain.xamlから呼び出したサブルーチンProcess.xamlで実施しています。
サブルーチンProcess.xamlは繰り返し実行するため、繰り返しの都度、WebページのOpen/Closeが発生するのは避けたいです。
繰り返しの最初に、WebページをOpenし、繰り返し終了時にWebページをCloseする方法は下記でよろしいでしょうか?

Process.xamlの
NApplication Cardのプロパティ-オープン動作(IfNotOpen)
NApplication Cardのプロパティ-クローズ動作(デフォルトまたはNever)

Process.xamlの最後の繰り返しを条件分岐で判断、Trueであれば、下記のNApplication Cardを配置
NApplication Cardのプロパティ-オープン動作(Never)
NApplication Cardのプロパティ-クローズ動作(Always)

1 Like

Hi @gorby

Set the “close” property of the use application/browser activity to “never”. Then it will never closes the browser.

After the end of the seq use kill process to close the browser.

Hope it helps.

Hi will you do me a favor by showing me how to write “process” and “process name” in the kill process activity in case I want to kill chrome browser?

process

@gorby

You can get the process name as follw:

  1. Go to Browser or Application file location
  2. Right click the application and select properties
  3. You can get the process name in target

ex: For chrome browser, process name is “chrome”
image

Note:Give process name in “”

Thank you for your swift reply!
Additional question for you.
May I use Application Card close operation settings “always” instead of kill process activity?

Hi @gorby

If you give the always in that option it will close the browser after automating the web application.
If you give the Never in that option it never close after the automation.

Kill process activity is used to kill the process at any position where we put this activity.

Hope it helps!!

@gorby

Yes you can. But you need to pass the same URL as the browser currently opens then it will close that tab. Else it will open another instance and close that one.