PrompteryxBeta
    ⌘K
    PlatformSupport
    Menu
    IntroductionInstall Desktop & extensionQuick StartPlatform Overview
    OverviewWhat you can makeAI Browser Agent in the chatModels and AutoConnectorsSchedulesProjectsExplore and publishingShare linksMemory and SkillsPersonal agent (beta)Welcome, settings and skinsPlans, credits and top-upsPrompteryx DesktopGroups (pilot)Phone app (early access)
    OverviewCreating WorkflowsTesting & DebuggingScheduling
    OverviewGetting StartedCommandsRecordingSettingsStructured OutputParallel AgentsTips & Best Practices
    OverviewInstallationSidebar AgentUsing Attached FilesExecute on Current TabExporting to Visual Studio
    Overview
    OverviewOpen PageClickClick CoordinatesFillExtract TextScreenshotWaitPress KeyFocus ElementBlur ElementSelect TextHighlight ElementSet ViewportGet Bounding BoxScrollHoverSelect OptionAssertionsCookiesEvaluate JavaScriptExample Workflows
    OverviewPrompteryx Browser AgentOpenAI
    OverviewSchedule TriggerWebhook Trigger
    OverviewGoogle SheetsGoogle CalendarConnect Hub (3,000+ apps)Example Workflows
    AI Vision SettingsChrome Automation ProfilesCloud BrowserBrowser Profiles & Persistent ContextVideo RecordingExecution LogsSharing & CollaborationEdit History
    Selectors GuideVariables
    Start hereGet an API keyRun the AI browser agentDrive a cloud browserRun workflows from anywhereUse connected apps (Connect Hub)SDK (TypeScript)CLIMCP for AI assistants
    REST APIWebhooksMCP toolsCloud Browser APICloud Browser quickstartMigrate from Browserbasen8nZapierMake.com

    Need help? Contact Support

    1. Documentation
    2. Nodes
    3. Browser Actions
    4. Set Viewport

    Set Viewport Size

    Browser Node

    Control the size of the browser viewport

    Overview

    The Set Viewport node controls the size of the browser viewport. This affects how responsive websites render and is essential for consistent screenshots, coordinate-based clicks, and mobile/tablet testing.

    Parameters
    Configuration options for this node
    Width
    Number
    Required

    Viewport width in pixels

    Default: 1280
    Example: 1920, 1280, 375
    Height
    Number
    Required

    Viewport height in pixels

    Default: 720
    Example: 1080, 800, 667

    Common Viewport Sizes

    Desktop

    1920 × 1080 - Full HD

    1440 × 900 - Laptop

    1280 × 800 - Small laptop

    Tablet

    1024 × 768 - iPad landscape

    768 × 1024 - iPad portrait

    820 × 1180 - iPad Air

    Mobile

    390 × 844 - iPhone 14

    375 × 667 - iPhone SE

    360 × 640 - Android

    When to Use

    Consistent Screenshots

    Set viewport before screenshots to ensure consistent image sizes across runs. Essential for visual comparison or documentation.

    Coordinate Clicks

    If using Click Coordinates, set viewport first. Element positions change with viewport size - a consistent viewport ensures clicks land in the right place.

    Mobile/Responsive Testing

    Test how your automation handles responsive layouts by setting mobile-sized viewports. This changes the size only — it doesn't emulate a mobile device (user agent, touch).

    Trigger Responsive Breakpoints

    Some elements only appear at certain viewport sizes (hamburger menus, mobile nav). Set the appropriate viewport to access these elements.

    Usage Examples

    Example 1: Full HD Desktop
    Standard desktop screenshot workflow
    Width: 1920
    Height: 1080
    Example 2: iPhone-Sized Viewport
    Test mobile responsive layout
    Width: 390
    Height: 844
    Example 3: Responsive Testing Workflow
    Test across multiple viewport sizes

    Workflow pattern:

    1. Open Page: example.com
    2. Set Viewport: 1920 × 1080 (desktop)
    3. Screenshot: desktop.png
    4. Set Viewport: 768 × 1024 (tablet)
    5. Screenshot: tablet.png
    6. Set Viewport: 375 × 667 (mobile)
    7. Screenshot: mobile.png

    Best Practices

    Set Viewport After Open Page
    The viewport is tied to a page context. Set it after Open Page and before any interactions that depend on layout.
    Consider Full Page Screenshots
    For full page screenshots, viewport height doesn't matter if using the "Full Page" option - the screenshot captures the entire scrollable area.

    Related Documentation

    Screenshot Node

    Capture at viewport size

    Click Coordinates

    Position-based clicks

    Open Page

    Start browser sessions