Close browser Modern UI

I have created a Sequence that logs in to a website, later on I want to use this browser window in another Sequence.
In the FrameWork there is a CloseAllApplication, I would like this to close my Chrome browser, but with Modern UI I don’t have the Close Application!

How do you do this? do you use the Kill Application?

I’m using UiPath.UIAtomation.Activities = 20.10.6

Hi,

We can use Options-Close property of Use Application/Browser activity as the following.

Regards,

The problem is that I don’t want to auto-close it after signing in, because I have another Sequence doing some work afterwards.

Found the solution though, after activating Show Classic I can now use the Close Application :wink:
image

The Modern UI Experience has just disabled that :frowning:

Hi,

FYI, I mean the following steps.

First, Open browser using Use Application/Browser with Close option Never and Output Element (Let’s say elm variable).

Next, do something.

Finally, Attach browser using Use Applcation/Browser with the above elm variable at Input element property. and its Close property have Always. As result, the browser will close after your task.

Regards,

1 Like

If you are using the REFrameWork, How would you interact with 2 different websites and remember to close them?

Would you Open and sign in using the Init phase, and save them to 2 different elements?
Then in Process you will parse these elements as parameters?
And in the End when you closeAllApplications you will again use the 2 elements in 2 close statements?

I’m curious on how to do this using UiPath Best Practice.

Hi,

If i have to handle many browsers, I’ll use Dictionary<String, UiElement>to handle them.
When open new browser, add its uielement to the dictionary. If close browser, delete its key.
Finally, we can easily close all browser by iterating the directory.

I think it’s better to implement objectContainer (such as Dictionary<String,object>) into framework in advance, in order to avoid adding arguments many times.

Regards,

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