-
Notifications
You must be signed in to change notification settings - Fork 76
ContextMenuItem
Jan Richter edited this page Apr 24, 2019
·
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 = item.getLabel();