# Select Tab

Focuses an existing tab

#### Query Type

* URL
  * Select tab by the tab's current URL
* Tab ID
  * Select tab by its ID

#### Query

* If Query Type is URL
  * URL of the tab to select
    * Matches the first tab that contains the URL as a substring (e.g. "google.com" matches a tab with "mail.google.com")
* If Query Type is Tab ID
  * ID of the tab to select (see [Get Active Tab ID](https://docs.browserflow.app/reference/browserflow-commands/tabs/get-active-tab-id))

#### Create tab if needed (applicable if Query Type is URL)

* Creates a tab with the URL if one does not already exist
