Skip to main content

Overview

The rightClick() method does a right-click action on an element. It usually opens context menus. You can call it on an Element instance. Or you can use it with a selector.

Syntax

Parameters

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

Returns

It returns a Promise<void>. The promise 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