Overview
TherightClick() 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 anElement, no parameters are required.
When called directly on the AI client:
Returns
It returns aPromise<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
Related Methods
click()- Single click on an elementdoubleClick()- Double-click on an elementmouseDown()- Press mouse button without releasingmouseUp()- Release mouse buttonhover()- Move mouse over element without clicking

