Skip to main content

Overview

The rightClick() method performs a right-click action on an element, typically used to open context menus. You can either call it on an Element instance or use it directly with a selector.

Syntax

Parameters

When called on an Element, no parameters are required. When called directly on the AI client:

Returns

Returns a Promise<void> that resolves when the right-click action completes.

Examples

Right-Click to Open Context Menu

Direct Right-Click with Selector

VS Code Context Menu

Browser Context Menu

Custom Context Menu in Web App