Close tab Version 12 (Java)
Action group: Browsers
Description
The action closes the selected tab.
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Context | Action context for working with the browser | Robin.Selenium | Browser context | Yes |
Tab index | Tab index | Robin.Numeric | No | |
Tab title | Tab name | Robin.String | No | |
Match type | The type of text to match with the title. Strict - the title is equal to the «Text» parameter. Not strict - the title contains the «Text» parameter. Regular Expression - The title matches the regular expression in the «Text» parameter. | Robin.String | No |
Special conditions of use
Comparison of text when a tab is selected is case-insensitive.
If there is only one tab - System closes the browser.
Example of use
Task
Open browser and follow the link https://bankrot.cdtrf.ru//public/i/miregister.aspx, next open the page https://dzen.ru/?clid=2337508-193&from=dist_bookmark&win=381&yredirect=true in a new tab. After that close the second tab, leaving only the first one open.
Solution
Use the "Open browser", "Navigate", "Navigate", "Close tab" actions.
Implementation
- Assemble a robot scheme with the actions.
- Set the "Open browser" action parameters.
- Set the "Navigate" action parameters (for the first tab).
- Set the "Navigate" action parameters (for the second tab).
- Set the "Close tab" action parameters. If the "Tab index" parameter is filled in, it has a priority over the "Tab title" parameter.
- Click "Start" in the top panel.
Result
The program robot completed successfully. The second tab is closed.
Обзор
Инструменты контента