Navigation Actions
Actions for navigating browsers to URLs and controlling tabs.
open
Navigate the current tab to a URL and wait for the content script to be ready.
Value: string (URL)
{ "open": "https://example.com" }
openNewTab
Open a URL in a new tab. By default, closes all other non-pinned tabs.
Value: string (URL)
{ "openNewTab": "https://example.com" }
Options
| Option | Type | Default | Description |
|---|---|---|---|
closeOthers | boolean | true | Close other tabs when opening the new one |
{
"openNewTab": "https://example.com",
"options": { "closeOthers": false }
}
setViewportSize
Resize the browser window to exact viewport dimensions. Accounts for browser chrome (toolbars, etc.) to ensure the content area matches the specified size.
Value: [width, height]
{ "setViewportSize": [1920, 1080] }
{ "setViewportSize": [375, 812] }
wait
Pause execution for a specified number of milliseconds.
Value: number (milliseconds)
{ "wait": 2000 }
Example: Navigate and Resize
{
"actions": [
{ "setViewportSize": [1280, 720] },
{ "openNewTab": "https://example.com" },
{ "wait": 1000 },
{ "screenshot": "viewport" }
]
}