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. Focus

    Focus Element

    Browser Node

    Set keyboard focus on elements for input

    Overview

    The Focus Element node moves keyboard focus to a specific element. This is useful before typing text, pressing keys, or interacting with elements that need focus to work properly.

    Parameters
    Configuration options for this node
    Selector
    Selector
    Required

    The element to focus. Use the Selector Picker for visual selection.

    Example: #search-input, .email-field, getByLabel('Username')
    Timeout
    Number

    Maximum time to wait for the element in milliseconds

    Default: 30000

    When to Use

    Before Press Key

    Keyboard events go to the focused element. If you need to press keys (like Enter, Tab, or shortcuts) on a specific element, focus it first.

    Trigger Focus Events

    Some forms show validation messages, dropdowns, or autocomplete when an input gains focus. Use Focus to trigger these behaviors.

    Accessibility Testing

    Test keyboard navigation by focusing elements and checking focus indicators. Useful for accessibility compliance testing.

    Usage Examples

    Example 1: Focus Before Keyboard Shortcut
    Focus editor before pressing Ctrl+Enter

    Workflow sequence:

    1. Focus Element: .editor-textarea
    2. Press Key: Key = Enter, Modifier 1 = Control
    Example 2: Trigger Autocomplete
    Focus input to show autocomplete dropdown

    Workflow sequence:

    1. Focus Element: #city-input
    2. Wait for Element: .autocomplete-dropdown (visible)
    3. Fill: Type city name
    Example 3: Tab Navigation Test
    Test keyboard navigation order

    Workflow sequence:

    1. Focus Element: #first-field
    2. Press Key: Tab
    3. Assert Element State: #second-field, Assertion Type = Is Focused

    Related: Blur Element

    The Blur Element node removes focus from an element. Use it to:

    • Trigger blur/change events after filling a field
    • Close dropdowns that appeared on focus
    • Validate form fields that check input on blur

    Best Practices

    Fill Usually Focuses Automatically
    The Fill node automatically focuses the input before typing. You usually don't need a separate Focus node before Fill - it's built in.
    Use for Keyboard Events
    Focus is most useful before Press Key nodes. Keyboard events are sent to the focused element, so make sure the right element has focus.

    Related Documentation

    Press Key Node

    Keyboard interactions

    Fill Node

    Type into inputs

    Blur Element

    Remove focus

    Click Node

    Click to focus