# 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](/reference/browserflow-commands/tabs/get-active-tab-id.md))

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

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.browserflow.app/reference/browserflow-commands/tabs/select-tab.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
