-
Notifications
You must be signed in to change notification settings - Fork 77
ContextMenuItem
github-actions[bot] edited this page Apr 23, 2024
·
3 revisions

One can retrieve an item from an open context menu, much like follows:
import { ActivityBar } from 'vscode-extension-tester';
...
const menu = await new ActivityBar().openContextMenu();
const item = await menu.getItem('References');// if item has no children
await item.select();
// if there is a submenu under the item
const submenu = await item.select();const parentMenu = item.getParent();const label = await item.getLabel();