Вы просматриваете старую версию данной страницы. Смотрите текущую версию.

Сравнить с текущим просмотр истории страницы

« Предыдущий Версия 2 Текущий »

Switch to Tab Version 16 (Java)

Action group: Browsers


Description

The action switches focus to a selected tab among other open tabs.

Action icon

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ContextAction context for working with the browserRobin.SeleniumBrowser contextYes
Tab indexTab index. The serial number of the tab. In some cases, the index of the tabs may not match the order of their actual locationRobin.Numeric5No
Tab titleTab name. If filled in, it takes precedence over the "Index" parameterRobin.StringConfluenceNo
Match typeThe type of text to match with the Tab title field. "Strict" - the title is equal to the «Tab title» parameter. "Not strict" - the title contains the «Tab title» parameter. "Regular Expression" - The title matches the regular expression in the «Tab title» parameterRobin.String
No

Special conditions of use

The numbering of tabs is done in the order of opening and does not depend on the subsequent movement of tabs in the browser, but always corresponds to their current number. I.e. after removing the 4th tab from 5, the 5th tab will become the 4th.

Text comparison when a tab is selected is case-insensitive.

Example of use

Task 

Open two tabs in a browser, switch to the first one and refresh it.

Solution 

Use the "Open Browser", "Navigate", "Switch to Tab", "Refresh" actions.

Implementation

  1. Assemble a robot scheme with the actions.
  2. Set the "Open browser" action parameter.
  3. Set the "Navigate" action parameters (the first link).
     
  4. Set the "Navigate" action parameters (the second link).
     
  5. Set the "Switch to Tab" action parameters.
  6. Set the "Refresh" action parameter.
  7. Click "Start" in the top panel.

Result

The program robot completed successfully.

  • Нет меток