> For the complete documentation index, see [llms.txt](https://testingvn.gitbook.io/playwright/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://testingvn.gitbook.io/playwright/implement-test-cases/context-click-right-click.md).

# Context Click - Right Click

```typescript
import {test, expect} from '@playwright/test';

test('right click context menu', async ({ page }) => {
    // Go to the context menu page
    await page.goto('https://the-internet.herokuapp.com/context_menu');
    
    // Right click on the box
    const box = page.locator('#hot-spot');
    await box.click({ button: 'right' });
    
    // Wait for the alert to appear
    page.on('dialog', async dialog => {
        expect(dialog.message()).toBe('You selected a context menu');
        await dialog.dismiss();
    });
})

```
