Moving to or closing a previously opened window / application

Hi all,

I am running the following sequence (simplified):

  • open chrome window at a specific website
  • open another chrome window at another website
  • input dialogue

After clicking “ok” in the input dialogue, I want to close the two chrome windows, either via a direct activity or alternatively by switching to these windows and closing them via shortcut. I could not find any solution that works so far. I could not test the “classic” activities at they seem to be blocked by the administrator.

Thanks for your support!

@max_imus

Use kill process in kill process type “Chrome”

Or
Navigate browser activity

Hi @max_imus

Use navigate browser activity to close the tab after the input dialog.
image

Hi @max_imus

Use Navigate Browser activity and give Close Tab for that.
image

Or you can use Kill Process:
image

Hope it helps!!

@max_imus

Depending on the window name you can attach and then use close browser or pass the window name to close browser

cheers

Hi @max_imus

You can use Navigate browser activity and in action use close tab.

OR

If you are using open browser to open chrome then pass a variable for open browser activity and after input dialogue use close tab activity and pass the open browser variable in its input browser tab.

Thanks a lot for all your fast replies! Many of the options you mention if found earlier but they don’t work as I get a hint that “This activity must be inside a Use Application / Browser activity”.

However, I am intentionally “leaving” the browser window before and don’t seem to find a way to navigate back to it. And the kill option I cannot access as I don’t have the option in Design Style settings to deactivate modern mode.

I assume there is some sort of simple solution that I am not seeing.

Hi @max_imus

Use Navigate Browser activity within the Use Application/Browser activity

Hi @max_imus

Use the below way:

Regards

@max_imus

Then use the same use browser/application activity after input dialog box with Open property as Never and then use navigate browser activity in that scope.
image

Hope it helps.

Create 2 Uielement type variables and assign them to the “Output element” property of your existing “Use application/browser” activities.

Then drag 2 new “Use application/browser” activities after your Input dialog activity, and put the UiElement variables in the “Input Element” property. Set the “Close” to “Always” and “Open” to “Never”. You don’t need to place any activities inside the scopes.

Use Application/Browser for first window - output element to a variable; open set to always, close set to never
– do this window’s steps
Use Application/Browser for second window - open set to always, close set to never
– do this window’s steps
– click ok
Use Application/Browser - use the variable from the first Use App; set open to never, close to always
– no activities inside this Use App

Kill process is not how you close a specific window.

Thanks a lot @postwick, this did exactly what i needed!

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