Skip to content

element.rightClick

element.rightClick(options?: Object): Promise<void>

Section titled “element.rightClick(options?: Object): Promise<void>”

Simulates a right click event on the element.

  • options.altKey: Indicates if the Alt key is pressed.
  • options.ctrlKey: Indicates if the Ctrl key is pressed.
  • options.metaKey: Indicates if the Meta key is pressed.
  • options.shiftKey: Indicates if the Shift key is pressed.
  • Returns a promise that resolves when the event is complete.
describe('Test script', function () {
it('Test 1', async () => {
const element = await gf.get('.my-button');
await element.rightClick();
});
});