ContextMenuItem - redhat-developer/vscode-extension-tester GitHub Wiki
Lookup
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');
Select/Click
// if item has no children
await item.select();
// if there is a submenu under the item
const submenu = await item.select();
Get Parent Menu
const parentMenu = item.getParent();
Get Label
const label = await item.getLabel();