Skip to main content

Close web page

Sophie avatar
Written by Sophie
Updated over 2 weeks ago

Definition and Usage

Close web page command allows you to close a specific web page tab or all open tabs in a browser. This action can be used to manage browser resources, complete workflows after web tasks are finished, or prepare for opening new web pages.


Parameter Values

Input parameters

Parameter

Description

Possible Values

Required

Options / Notes

Close

Choose whether to close a specific web page or all web pages

Specific tab, All tabs

Yes

Select "Specific tab" to close an individual tab or "All tabs" to close all open tabs

Web page

Select a variable that contains the web page to work with

Yes (when "Specific tab" is selected)

This parameter is only needed when closing a specific tab

Browser

Select a browser type to operate on

Built-in browser, Google Chrome, Microsoft Edge, 360 Secure Browser, AdsPower, BitBrowser, SuperBrowser

Yes

Choose the browser where the tabs should be closed

Error handling

Parameter Name

Description

Throw error & stop

When an error occurs, the action will trigger an error and stop the execution of the entire app.

Retry command

If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process.

Ignore error & continue

When an error occurs, the action will be ignored, and the workflow will continue without interruption.

Variables produced

This action doesn't produce any variables.


Using Variables in Conditions

You can use variables in the "Web page" field by clicking the variable icon or typing "{variableName}". This allows you to dynamically specify which web page to close based on variables created in previous steps of your workflow.


Notes

  • Before closing a specific tab, ensure that the web page variable contains a valid web page reference.

  • When closing all tabs, be aware that this will terminate all browser sessions in the selected browser type.

  • If the specified web page doesn't exist or has already been closed, an error may occur.

  • Different browsers may behave slightly differently when closing tabs, especially when handling browser windows with only one tab.

Did this answer your question?