Close action
- Updated: 2022/11/11
Close action
Use the Close action in the Browser package to close a browser window or tab.
Settings
Note: This action supports Google Chrome, Chromium-based Microsoft Edge, and Internet Explorer browsers.
- Select to close the tab, window, or all browsers:
-
Tab: Closes the selected tab. Select the browser tab
from the list of active supported browser tabs or insert a window
variable.
You can use a regular expression (regex) to identify a window title. Select the regular expression condition as either String or a Pattern and then enter the value. By default, the Window title field is case-sensitive.
To identify a browser title, you can enable the Case sensitive option to match the letter case, or disable the option to identify a window title where the letter case does not match.Note: Ensure that the minimum Bot Agent version installed on your system is the version that was released with Automation 360 v.26. If you have a Bot Agent version released with Automation 360 v.25 or earlier, then by default, the window title will be identified only with matching letter case (case-sensitive).For example, to match all window title names beginning with a word followed by- Notepad
, you can enter the String value as * -Notepad, or use Pattern value as ((\w)\s)*document-Notepad for only those window titles that match this pattern.Note:- When you use a regular expression of type String with -title as the input value for a window title in any action, the bot might encounter a run time error. To prevent the run time error, ensure that when you add the string input as *-title, the application with the specific title is open. The asterisk (*) is just a character, not a wild card character.
- When you use a regular expression of type Pattern with
-title as the input value for a window title in any
action, the bot might encounter a run time
error because the input value *-title is
incorrect.
Ensure that you use valid regex patterns.
-
Window: Closes the window of the selected tab. Select
the window from the list of active supported windows or insert a window
variable.
You can use a regular expression (regex) to identify a window title. Select the regular expression condition as either String or a Pattern and then enter the value. By default, the Window title field is case-sensitive.
To identify a browser title, you can enable the Case sensitive option to match the letter case, or disable the option to identify a window title where the letter case does not match.Note: Ensure that the minimum Bot Agent version installed on your system is the version that was released with Automation 360 v.26. If you have a Bot Agent version released with Automation 360 v.25 or earlier, then by default, the window title will be identified only with matching letter case (case-sensitive).For example, to match all window title names beginning with a word followed by- Notepad
, you can enter the String value as * -Notepad, or use Pattern value as ((\w)\s)*document-Notepad for only those window titles that match this pattern.Note:- When you use a regular expression of type String with -title as the input value for a window title in any action, the bot might encounter a run time error. To prevent the run time error, ensure that when you add the string input as *-title, the application with the specific title is open. The asterisk (*) is just a character, not a wild card character.
- When you use a regular expression of type Pattern with
-title as the input value for a window title in any
action, the bot might encounter a run time
error because the input value *-title is
incorrect.
Ensure that you use valid regex patterns.
- All browsers: Closes all open browser windows for supported browsers.
-
Tab: Closes the selected tab. Select the browser tab
from the list of active supported browser tabs or insert a window
variable.
-
Optional: In the Time
out after field, enter the number of
seconds the bot must wait for the browser
window or tab to close before the bot
fails. Note: Enter a timeout value of at least 9 seconds.