DocsPage Interactionbrowser_right_click

browser_right_click

browser_right_click

Right-click (context click) on an element to open the context menu. Useful for accessing secondary actions like 'Open in new tab', 'Copy link', or custom application menus.

When to use browser_right_click

Use browser_right_click when you need to simulate real human interaction with page elements. It is part of Owl Browser's Page Interaction toolset and runs inside a self-hosted, source-level stealth engine, so every call inherits the same undetectable browser fingerprint as the rest of your automation — no separate anti-detect setup required.

Usage Example

123456789101112
import asyncio
from owl_browser import OwlBrowser, RemoteConfig
# Async usage
async with OwlBrowser(config) as browser:
context = await browser.create_context()
context_id = context["context_id"]
await browser.right_click(
context_id=context_id,
selector="#element-id"
)

Parameters

Required

context_idstringrequired

The unique identifier of the browser context (e.g., 'ctx_000001')

selectorstringrequired

The element to right-click. Accepts any of: an OwlMark handle token from browser_observe (e.g. 'b7', 'l3', 'x2'), the most reliable target on an agent-rendered page; a CSS selector (e.g. '#submit-btn', '.nav-link', 'input[name="user"]'); viewport coordinates as 'XxY' (e.g. '100x200'); or a natural-language description (e.g. 'the login button'), resolved by the built-in semantic matcher. When a CSS selector matches several elements, append ' >> nth=N' to pin down exactly which one (0-based): '.row button >> nth=2' targets the 3rd match, ' >> nth=-1' or ' >> nth=last' the last, ' >> nth=first' the first. Without the qualifier the tool falls back to its usual disambiguation. The qualifier applies to CSS selectors only; handle tokens and coordinates already name exactly one element.

Response

Returns a JSON object with the operation result.

{
  "success": true,
  "result": <value>
}

Frequently Asked Questions

What does browser_right_click do?

Right-click (context click) on an element to open the context menu. Useful for accessing secondary actions like 'Open in new tab', 'Copy link', or custom application menus. It belongs to Owl Browser's Page Interaction category and is available through the REST API, the Python SDK (browser.right_click()), the Node.js SDK, and the MCP server.

What parameters does browser_right_click accept?

browser_right_click accepts 2 required parameters (context_id, selector) and 0 optional parameters. All parameters are sent as JSON in a POST request to /api/execute/browser_right_click.

Is browser_right_click detectable by anti-bot systems like Cloudflare or DataDome?

No. browser_right_click executes inside Owl Browser's Chromium engine, which applies fingerprint spoofing at the C++ source level rather than through JavaScript patches. Every tool call shares the same consistent, human-like fingerprint, so anti-bot systems such as Cloudflare, DataDome, and Akamai see an ordinary browser.

Related Tools

browser_click

Click on an element using CSS selector, XY coordinates, or natural language description. Supports semantic element finding using AI - describe what you want to click (e.g., 'login button', 'search icon') and the system will locate the right element. Simulates a real mouse click with proper event dispatch. Optionally hold the mouse button for press-and-hold interactions using hold_ms.

browser_type

Type text into an input field with human-like keystroke simulation. Target the field using CSS selector, coordinates, or natural language (e.g., 'email field'). When selector is omitted, types into the currently focused element. Note: Does NOT clear existing content - use browser_clear_input first if you need to replace text rather than append.

browser_pick

Select an option from a dropdown or select element. Works with native HTML select elements and dynamic/custom dropdowns (like select2, react-select). Specify the option by its value or visible text. Automatically handles opening the dropdown and selecting the option.

browser_press_key

Press a keyboard key. Supports special keys (Enter, Tab, Escape, arrow keys, etc.) and single characters (a-z, A-Z, 0-9). The key is sent to the currently focused element. Common uses: Enter to submit forms, Tab to move between fields, Escape to close modals, Arrow keys for navigation in menus or sliders, or single characters for keyboard shortcuts.

browser_submit_form

Submit the currently focused form by simulating an Enter key press. Equivalent to pressing Enter in a form field. Useful for search boxes and forms that submit on Enter. The form must have a focused input element.

browser_drag_drop

Perform a mouse drag operation from start coordinates to end coordinates. Used for slider CAPTCHAs, puzzle solving, canvas drawing, and custom drag interactions. Uses realistic mouse movement with bezier curves. For HTML5 draggable elements, use browser_html5_drag_drop instead.

Browse the full Owl Browser API reference or get started with the Python SDK and Node.js SDK.