How to close the browser in REFramework, using modern activities?

Hello guys,

I have following scenario:

  • I use REFramework
  • in InitAllApplications I open the browser and log into the website
  • Now I’m in the file CloseAllApplications ==> Here is where my question comes in:

How can I close the browser from here using modern activites? I’m aware that I could use this functionality (within my InitAllApplications):

image

But this has to be set to never. I don’t want the browser to be closed after the initialization, only after the app is done processing all transactions. But how to achieve this?

Thx

1 Like

Hi,

In CloseAllApplications you can use the use application/Browser activity and set the parameter Close with Always.
This will cause the browser to close, as this activity is in the End Process state, it will be executed at the end of the process.

1 Like

@GeraltDieSocke

You should create a close browser/logout workflow which attaches the browser and closes it, i.e. by going through the logging out process, clicking the x button or using a browser command, then invoke this in the CloseAllApplications workflow.

In KillAllProcesses, you should have a Kill Process activity for the browser, in the case that the Browser does not close properly, KillAllProcesses will force close it.

Kind Regards

Ok so I should actually click the x button on the browser you mean?

Thx to both of you :slight_smile: @tainan.ramos

What is best practice?

Yes,

Best practice encourages the creation of reusable, maintainable, minimalistic functions (separated into workflows).

I would advise creating a logging out procedure on the browser for any systems you may be using, then a separate workflow for closing the browser. If you make that distinct separation, you can re-use the close browser in other automations you may make.

Kind Regards

Hi @GeraltDieSocke,

You can use Kill Process If you do not get any potential solution. Kill process will direct kill the browser.

Thanks

With the modern activity pack, using the “use application/Browser” activity and the “Close” property with “Always” you don’t need to click the close button, because the activity itself will close the browser, that’s what this property is for was raised.

Thx all of you.
I created a combination of 2 solutions from @tainan.ramos and @Che

In the CloseAllApplications I added a useApplication Browser and choose the instance thats already opened (via a UI Element variable). I set its close property to always. But before I added a click Activity that logs out first.

@Shikhar_Tandon Thx this one I implemented in KillAllProcesses

Thx to everyone!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.